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

Schlagworte:
  • 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

Anhänge (2)

Typ: image/jpeg
115-mal heruntergeladen
Größe: 764,46 KiB
Typ: application/zip
1127-mal heruntergeladen
Größe: 3,21 KiB

Lösung anzeigen Lösung verbergen

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

Anhänge (1)

Typ: image/png
157-mal heruntergeladen
Größe: 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.

Zitiert von: 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

Anhänge (3)

Typ: image/jpeg
76-mal heruntergeladen
Größe: 157,63 KiB
Typ: image/jpeg
52-mal heruntergeladen
Größe: 36,74 KiB
Typ: image/jpeg
42-mal heruntergeladen
Größe: 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

Anhänge (1)

Typ: image/png
157-mal heruntergeladen
Größe: 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.

Zitiert von: 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

Anhänge (2)

Typ: application/zip
1160-mal heruntergeladen
Größe: 3,95 KiB
Typ: image/jpeg
79-mal heruntergeladen
Größe: 633,04 KiB