[Pregunta] Assigning attributes and optimising! - Attribute zuweisen

Etiquetas:
  • Allplan
  • 2022
  • Assigning
  • Attributes
  • Attribute
  • Zuweisen

Hi

ENG:
Is there a way to use fewer nodes for assigning attributes?
E.g. insert a string or list of tuples at input 'A' (see image)?
We would like to avoid using two nodes for each attribute (We need not only standard attributes but also many userattributes).

DE:
Gibt es eine Möglichkeit, weniger Knoten für die Zuweisung von Attributen zu verwenden?
Z.B. durch Einfügen einer Zeichenkette oder einer Liste von Tupeln am Eingang 'A' (siehe das Bild)?
Wir möchten vermeiden, für jedes Attribut zwei Knoten zu verwenden (Wir brauchen nicht nur Standardattribute, sondern auch viele Benutzerattribute).

zip ---> file .pyp

Thanks!

Best Retards
Francesco

Adjuntos (2)

Type: image/jpeg
Descargado 178 veces
Size: 126,12 KiB
Type: application/zip
Descargado 721 veces
Size: 1,79 KiB

Currently nodes for manipulating attributes are quite restricted in VS. We will improve the workflow for it later step by step.

But, do you want to assign attributes to the object in side a PythonPart object, or do you want to assign attributes to the PythonPart itself?

Product Owner API, Allplan GmbH

Hi Xinling,

thank you for your answer.

To answer your question, I performed an export test in IFC.
Basically I created with VS a PythonPart consisting of a cylinder and a Pipe. I exported it to IFC and got an IfcBuildingElementProxy. In the test I assigned the attributes manually (not via VS), after generating the PythonPart with VS.
In answer to your question: I think the attributes must be assigned to the PythonPart. However, I would be grateful if you could explain the difference between the two cases.

Thank you very much

br
Francesco

Adjuntos (2)

Type: text/plain
Descargado 673 veces
Size: 185,44 KiB
Type: image/jpeg
Descargado 82 veces
Size: 62,12 KiB

The difference is whether you want to access (e.g. via report) these attribute directly without unlink the PythonPart object.

If you want to assign attributes to the PythonPart itself, which actually is a "container", you can run your report to do the quantity take off based on that attribute. You can use the node SetValueToAttribute to accomplish this and you don't need to connect it to other nodes (such as geometry), it will apply the attribute to the container. But currently it doesn't support to assign multiple attributes. It might be possible with python code in ExecPythonScript.

If you want to assign different attributes to the different sub objects inside the PythonPart container, currently, it is only possible with writing python code in the node ExecPythonScript. And report won't be able to access these attributes for now. You have to unlink the PythonPart container to see these attributes.

I hope it helps you to understand the difference between them!

Product Owner API, Allplan GmbH

Hi Xinling,

thank you for your answer.

Now it is clear and I want to assign attributes to the container.
Via Python means by calling the Pytho API in the ExecPythonScript node?
Could you please provide an example anyway?

I also found that the 'SetValuetoAttribute' node does not support special characters such as 'ß' for the value of 'AttributeName'. Could this problem be corrected?

Thank you and Best regard