[Frage] How to set an attribute to object in VS?

Schlagworte:
  • Visual
  • Scripting
  • Attributes

Hi!

How to set an attribute to an object in VS?
In example (LabelNodePortsAsAllplanUserAttributes.pyp) node setting attribute @GeneratedDateAt@ = integer
But it's doesn't appear in PP attributes.

How to set an attribute to a pp via VS? For example, @name@

Anhänge (1)

Typ: image/png
246-mal heruntergeladen
Größe: 299,16 KiB

Have you tried restart the script and create the object again? Sometime it won't appear for the first time, because the attribute used didn't exist yet...

Product Owner API, Allplan GmbH

Yes, I did.
Even testing with projects with attributes saved for prj and for std - both the same. trying to use standard attributes - the same problem (for example @name@)
The attribute doesn't appear in the object

Anhänge (1)

Typ: video/mp4
1219-mal heruntergeladen
Größe: 7,13 MiB

Could you please upload the allplan.out and allplan_python.out for that?

Product Owner API, Allplan GmbH

yes, please. attached

Anhänge (2)

Typ: text/plain
1040-mal heruntergeladen
Größe: 264,08 KiB
Typ: text/plain
1110-mal heruntergeladen
Größe: 866,00 B

Just tried, and it does work under German version. But doesn't work under English version. We will try to fix that.
Which display language is your Allplan? English or Russian?

Product Owner API, Allplan GmbH

it also does not work for me in English. It didn't work in Russian either. But I tried it a few more times and it worked) So at the moment it definitely does not work only in English

We provide a patch in the next Allplan version (2021-1-13). It should fix the problem. Please check if you still have the same problem after update.
The hotfix is expected to be released later this week.

Product Owner API, Allplan GmbH