I have created simple code to Activate/Deactivate components in GS (with simple modification you can also Hide/Show components) in 99% cases it works but I have noticed that there is a problem with EXTRUDE this script is able to deactivate all EXTRUDE Functions but there is a problem when I would like to Activate them. I have noticed that script can't find and add to the list deactivated EXTRUDE functions and I have no idea why. Thank you in advance for your help
Below you can find my code:
Main code in ACTION:
GeometricalSet : OpenBodyFeature,visState : Boolean
let AxisSystems_List (List)
let Wireframe_List (List)
let Sketch_List (List)
let Wireframe_List (List)
let Surfaces_List (List)
let AxisSystem_GEO (AxisSystem)
let Wireframe_GEO (Wireframe)
let Sketch_GEO (Sketch)
let Surfaces_GEO (Surface)
AxisSystems_List = GeometricalSet ->Query("AxisSystem","")
Wireframe_List = GeometricalSet ->Query("Wireframe","")
Sketch_List = GeometricalSet ->Query("Sketch","")
Surfaces_List = GeometricalSet ->Query("Surface","")
for AxisSystem_GEO inside AxisSystems_List
{
AxisSystem_GEO.Activity = visState
}
for Wireframe_GEO inside Wireframe_List
{
Wireframe_GEO.Activity = visState
}
for Sketch_GEO inside Sketch_List
{
Sketch_GEO.Activity = visState
}
for Surfaces_GEO inside Surfaces_List
{
Surfaces_GEO.Activity = visState
}
Reaction to Run script:
if String.1 =="YES"
{
`Relations\Rules\Action deactivate` ->Run(`Geometrical Set.109`,true)
}
else if String.1=="NO"
{
`Relations\Rules\Action deactivate` ->Run(`Geometrical Set.109`,false)
}