Allplan Fórum

[Otázka] How to set an attribute to object in VS?

Tagy:
  • 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@

Přílohy (1)

Type: image/png
Staženo 216
Size: 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

Přílohy (1)

Type: video/mp4
Staženo 1184
Size: 7,13 MiB

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

Product Owner API, Allplan GmbH

yes, please. attached

Přílohy (2)

Type: text/plain
Staženo 1007
Size: 264,08 KiB
Type: text/plain
Staženo 1083
Size: 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