4

I have a Solid3D object inside a block and need to select its edges.

I tried:

viewport.SelectionFilterMode = selectionFilterType.Edge; 
viewport.ActionMode = actionType.SelectByPick;

As the block is treated as a single object, doing so would select the whole Solid3D object.

Could you suggest me a solution that I could use to get around this?

Ugnius Malūkas
  • 2,649
  • 7
  • 29
  • 42

2 Answers2

4

You should set viewportLayout.AssemblySelectionMode to assemblySelectionType.Leaf:

viewportLayout.AssemblySelectionMode = ViewportLayout.assemblySelectionType.Leaf;

and viewportLayout.SelectionFilterMode to selectionFilterType.Edge:

viewportLayout.SelectionFilterMode = selectionFilterType.Edge;
ab3nash
  • 156
  • 1
  • 8
0

You can set the BlockReference as current.

viewportLayout.Entities.SetCurrent(myBlockRef)
ilCosmico
  • 1,319
  • 15
  • 26