How Do I automate the toolbar options for convert and extend
Rajesh Meena
Moderator, Employee Posts: 85
✭✭✭✭
I am looking for script which can Automate the manual conversion and extension of selected entities.
Tagged:
0
Best Answer
-
Extend operations:
Till 2022R2:
# Adjacent , DS.Script.doGraphicsAdjacentSelect() #limit, DS.Script.doGraphicsAdjacentSelectRecursive() cmds = "DS.Script.doGraphicsAdjacentSelect();" ExtAPI.Application.ScriptByName("jscript").ExecuteCommand(cmds)
From 2023R1 onwards:
import toolbar toolbar.DoGraphicsAdjacentSelect(ExtAPI) toolbar.DoGraphicsAdjacentSelectRecursive(ExtAPI) toolbar.DoGraphicsAdjacentConnectionSelectRecursive(ExtAPI) toolbar.DoGraphicsExtendSelectInstances(ExtAPI)
For Entity Conversion:import toolbar toolbar.ConvertSelectionToFaces(ExtAPI) toolbar.ConvertSelectionToBodies(ExtAPI) toolbar.ConvertSelectionToEdges(ExtAPI) toolbar.ConvertSelectionToVertices(ExtAPI) toolbar.ConvertSelectionToNodes(ExtAPI) toolbar.ConvertSelectionToElements(ExtAPI)
1