iLogic to select by plane

iLogic to select by plane

andrew_canfield
Collaborator Collaborator
1,150 Views
1 Reply
Message 1 of 2

iLogic to select by plane

andrew_canfield
Collaborator
Collaborator

Hello

 

 

 

Select by plane.JPGI'd like to delete(maybe suppress) everything 50m south of plane A on an imported sat file assembly.

 

I can use the existing tool 'select by plane' but would like to drive it by iLogic.

 

I can create & name the work plane positions to then create a cube. (6 planes in total)

 

Drop in a different sat file assembly & the code strip down the assembly to just the parts inside the cube.

 

I need to identify the work plane , select all parts on on side of the plane, suppress (or delete) the selected parts.

 

Save the result as..

 

If the imported sat file assembly is a sub-assembly the planes created in the top level assembly to do the cutting need to be used.

 

Thanks

 

 

 

 

 

 

 

 

0 Likes
Accepted solutions (1)
1,151 Views
1 Reply
Reply (1)
Message 2 of 2

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

Hi @andrew_canfield,

 

Try the following iLogic code to perform "select by plane".

 

Dim oDoc As AssemblyDocument
oDoc = ThisApplication.ActiveDocument

Dim oDef As AssemblyComponentDefinition
oDef = oDoc.ComponentDefinition

Dim oPlane As WorkPlane
oPlane = oDef.WorkPlanes.Item("XY Plane")

Dim oCommand As CommandManager
oCommand = ThisApplication.CommandManager

oCommand.DoSelect(oPlane)

Dim oCtrlDef As ControlDefinition
oCtrlDef = ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyEnhSelSelectByPlaneCmd")

oCtrlDef.Execute2(True)

Please feel free to contact if there is any queries.

 

If solves problem, click on "Accept as solution" / give a "Kudo".

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network