Hi, could anyone tell me why when you activate "from layer" the parameters don't change like the layer?
See attachment.
- Forum
- CAD Parametrische Modellierung
- CAD SmartParts
[Frage] Mistake with "format from layer "
Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen
Sorry Bertrand, it cannot work, not for you and not in Allplan 2024-1-1
What Danilos means is, that at activated "from Layer"-checkbox then color, pen and stroke should be changed (to the layer defined values) , when you change the layer!
This requires some effort in the parameter script (s. smt_param_script_from_layer.png)
Anhänge (2)
Sorry Bertrand, it cannot work, not for you and not in Allplan 2024-1-1
What Danilos means is, that at activated "from Layer"-checkbox then color, pen and stroke should be changed (to the layer defined values) , when you change the layer!
This requires some effort in the parameter script (s. smt_param_script_from_layer.png)
Anhänge (2)
What Danilos means is, that at activated "from Layer"-checkbox then color, pen and stroke should be changed (to the layer defined values) , when you change the layer!
This requires some effort in the parameter script (s. smt_param_script_from_layer.png)
Hi Nemo, what I meant is exactly as you say! Thank you for new script, now works. Goodbye.
Hello,
But when I tried it, it worked. I must not have tested thoroughly enough.
I only looked at the result in the drawing file with the SmartPart placed on the Standard layer.
I didn't quite understand what was expected.
Looking at the code, it's true that I don't personally do this in the same way. I do rather as you mentioned in your complete solution.
Thanks for pointing it out.
Have a good day.
Hi Bertrand,
it's more or less only a GUI issue!
If you set the layer and the pen, stroke , color to the right values:
LAYER lyr_2d COLOR col_2d PEN pen_2d STROKE str_2d IF bly_2d THEN COLOR BY_LAYER PEN BY_LAYER STROKE BY_LAYER ENDIF
then the result is always correct, also without the extension in parameter-script.
The parameter-script is only responsible for the correct display of color-, stroke- and pen-comboboxes in the palette. (s. from_layer.mp4)
Anhänge (1)
Hi Jörg,
In the original question, I wasn't sure whether it was the representation in the drawing or in the SmartPart interface.
I thought it was the final result.
Yes, it was in fact an issue of GUI.
But that's the responsibility of the person writing the Smart Part code.
Thanks for the clarification.