Which command allows me to create a list of measures and access it from the property panel? [Vyřešeno]

Tagy:
  • Allplan
  • 2021-1-0
  • Visual
  • Scripting

Hi,
thank you for giving the possibility to create parametric objects
even to those who, like me, know almost nothing about programming languages.
I have created my first Allplan Visual Script!
to parameterize some wooden fencing panels of a very famous company in Italy.
However, I would like to add a drop-down list with theonly possible sizes offered by the company.

Which command allows me to create a list of measures and access it from the property panel?
I attach the .pyp of my panel.
Have patience if I have committed naivety in creation.
Thank you, see you soon.
Dario from the Dolomites.

Cordiali saluti,
Dario Ganz
https://www.eganz.it

Přílohy (2)

Type: image/jpeg
Staženo 115
Size: 764,46 KiB
Type: application/zip
Staženo 1127
Size: 3,21 KiB

Show solution Hide solution

The RadioButtonGroup will only return the index as value, not the display text as value. Please check the attached "RadioButtonWithList.png". It might be a solution. The idea is that to have a separate node to generate the real integer values you need, and use the node "ListItem" to select the correct integer value based on the index provided by the node "RadioButtonGroup". This walkaround is a little over complicated. But it should get the job done. Once you enter all the value in the node "ListIntegerInput", you can hide it from Allplan palette by toggling the eye icon on that node.

Otherwise you can wait for the new hotfix 2021-1-1, it will contain the node, which Horst mentioned in that post.

Product Owner API, Allplan GmbH

Přílohy (1)

Type: image/png
Staženo 157
Size: 122,42 KiB

if the max number of elements in that Drpdown is 6 or lower, maybe this can help.

from this german forum post.
https://connect.allplan.com/de/forum/themen/topic/topics/cad-visual-scripting-1/liste-erstellen.html

"Wenn ich richtig verstehe, könnte der Node "RadioButtonGroup" hier eine Lösung sein. Er bietet eine Auswahlmöglichkeit aus einer Liste mit max. 6 Einträge und liefert den Index des Eintrags zurück."

=>
RadioButtonGroup node could be a solution here. It offers a selection option from a list with a maximum of 6 entries and returns the index of the entry.

..See also the answer from Horst Homann in that linked post above:
with Version 2021-1-1 there wil lbe new node types that will over more possabilities ..

Allplan Webentwicklung

Private messages must be private. No support request via Private message.

Hi, thanks for the immediate reply.
I tried the RadioButtonGroup function which is sufficient for me but, despite the values appearing in the palette, then they are not actually inserted in the Height function which always takes a zero value.
I tried to add a SetValueToAttribute and set Integer for the value to get but I can't.
I followed Horst's instructions, downloaded what he proposed and inserted into etc. It is too complex for a normal user like me.
Thank you, see you soon.
Dario from the Dolomites.

Citoval jvelletti
if the max number of elements in that Drpdown is 6 or lower, maybe this can help.
from this german forum post.
https://connect.allplan.com/de/forum/themen/topic/topics/cad-visual-scripting-1/liste-erstellen.html
"Wenn ich richtig verstehe, könnte der Node "RadioButtonGroup" hier eine Lösung sein. Er bietet eine Auswahlmöglichkeit aus einer Liste mit max. 6 Einträge und liefert den Index des Eintrags zurück."
=>
RadioButtonGroup node could be a solution here. It offers a selection option from a list with a maximum of 6 entries and returns the index of the entry.
..See also the answer from Horst Homann in that linked post above:
with Version 2021-1-1 there wil lbe new node types that will over more possabilities ..

Cordiali saluti,
Dario Ganz
https://www.eganz.it

Přílohy (3)

Type: image/jpeg
Staženo 76
Size: 157,63 KiB
Type: image/jpeg
Staženo 52
Size: 36,74 KiB
Type: image/jpeg
Staženo 42
Size: 14,34 KiB

The RadioButtonGroup will only return the index as value, not the display text as value. Please check the attached "RadioButtonWithList.png". It might be a solution. The idea is that to have a separate node to generate the real integer values you need, and use the node "ListItem" to select the correct integer value based on the index provided by the node "RadioButtonGroup". This walkaround is a little over complicated. But it should get the job done. Once you enter all the value in the node "ListIntegerInput", you can hide it from Allplan palette by toggling the eye icon on that node.

Otherwise you can wait for the new hotfix 2021-1-1, it will contain the node, which Horst mentioned in that post.

Product Owner API, Allplan GmbH

Přílohy (1)

Type: image/png
Staženo 157
Size: 122,42 KiB

Perfect!
Thank you so much dear Xinling!
I am sending you an example of VS application
with different measures and the .pyp
if it may be useful to some colleague.
I wish everyone a good weekend.
Dario.

Citoval Xinling
The RadioButtonGroup will only return the index as value, not the display text as value. Please check the attached "RadioButtonWithList.png". It might be a solution. The idea is that to have a separate node to generate the real integer values you need, and use the node "ListItem" to select the correct integer value based on the index provided by the node "RadioButtonGroup". This walkaround is a little over complicated. But it should get the job done. Once you enter all the value in the node "ListIntegerInput", you can hide it from Allplan palette by toggling the eye icon on that node.
Otherwise you can wait for the new hotfix 2021-1-1, it will contain the node, which Horst mentioned in that post.

Cordiali saluti,
Dario Ganz
https://www.eganz.it

Přílohy (2)

Type: application/zip
Staženo 1160
Size: 3,95 KiB
Type: image/jpeg
Staženo 79
Size: 633,04 KiB