Support Forum

Which command allows me to create a list of measures and access it from the property panel? [Solved]


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.

Attachments (2)

img
Allplan-Visual-Script-Pircher-Grigliato-…
Type: image/jpeg
Downloaded 37 times
Size: 764,46 KiB
Type: application/zip
Downloaded 39 times
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.

Attachments (1)

img
RadioButtonWithList.png
Type: image/png
Downloaded 27 times
Size: 122,42 KiB
1 - 5 (5)
  • 1

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 ..

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.

Quote by 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 ..

Attachments (3)

img
20210430-Allplan-Visual-Script-LISTA-MIS…
Type: image/jpeg
Downloaded 14 times
Size: 157,63 KiB
img
20210430-01-Allplan-Visual-Script-LISTA-…
Type: image/jpeg
Downloaded 15 times
Size: 36,74 KiB
img
20210430-02-Allplan-Visual-Script-LISTA-…
Type: image/jpeg
Downloaded 12 times
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.

Attachments (1)

img
RadioButtonWithList.png
Type: image/png
Downloaded 27 times
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.

Quote by 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.

Attachments (2)

Type: application/zip
Downloaded 48 times
Size: 3,95 KiB
img
Allplan-Visual-Script-Pircher-Grigliato-…
Type: image/jpeg
Downloaded 29 times
Size: 633,04 KiB
1 - 5 (5)
  • 1

https://connect.allplan.com/ uses cookies  -  More information

Accept