Hi, how can I assign attribute to a geometry object? there is a way to convert it to a model object?
I've tried with StandardAttributePalette or AttributeModifier but I don't understand how to use them.
Das Wissen aller Anwender nutzen
Im Allplan Connect Forum tauschen sich Anwender aus, geben wertvolle Tipps oder beraten sich bei ganz konkreten Aufgabenstellungen − auch international.
Und damit wirklich keine Frage unbeantwortet bleibt, unterstützen die Mitarbeiter des Technischen Supports ebenfalls aktiv das Forum.
Es erwarten Sie:
- Foren-Vielfalt aus CAD Architektur, CAD Ingenieurbau uvm.
- Tipps von User für User
- international: Deutsch, Englisch, Italienisch, Französisch und Tschechisch
Melden Sie sich jetzt an und diskutieren Sie mit!
- Forum
- CAD Parametric Modelling
- Visual Scripting
[Frage] Assign attribute to geometry object [Gelöst]
Lösung anzeigen Lösung verbergen
It is possible with the node SetValueToAttribute. You can find the example under:
\Attributes\LabelNodePortsAsAllplanUserAttributes.pyp
With that script, you can generate one PythonPart with user-defined attributes.
Product Owner API, Allplan GmbH
Anhänge (1)
Hello Daniele,
first I need to know, whether your final result is a PythonPart?
Best regards
Horst
Hi Horst, I need to export a generic object with attribute.
Usually in ALLPLAN I convert a solid into a "architectural object" (corpo architettonico in italian), and then I assign attributes.
But in VS I see that, to assign attributes, the node requires only "ModelObject" and you can't assign attributes to a "GeometryObject"
Anhänge (1)
We have a built-in example for assigning attributes to existing ModelObject. You can find the VS example under:
\ModelObjects\Modification\AssignAttributes.pyp
If you start the script you can choose the attribute you want to assign from the side panel. Does that solve your problem?
Product Owner API, Allplan GmbH
Hi Xinling, what I would like to do is to create an object, like simple box for example, and assign to it some attributes.
Is it possible with VS?
It is possible with the node SetValueToAttribute. You can find the example under:
\Attributes\LabelNodePortsAsAllplanUserAttributes.pyp
With that script, you can generate one PythonPart with user-defined attributes.
Product Owner API, Allplan GmbH
Anhänge (1)
thanks Xinling
Hi Xinling, is it possible to assign also a standard attribute in the same way? like "name" or "object name" ?