I am trying to select block as well as line in Solidworks drawing 2011.
I am displaying propert page as per the selection of block or line.
If I keep the block filter on then I am able to select block and propertypage for block is diplayed but at this time I can not select the line
If I keep the block filter off then I am able to select block as weel as line.
What happens here is that block contains line so once the line containing block is selected my code displays propertypage for line
Here is the code -
Set SWDOC = swApp.ActiveDoc
Set swModel = SWDOC
Set swSelMgr = swModel.SelectionManager
params = swApp.GetSelectionFilters
Dim filters(1) As Long
filters(10) = swSketchLINE
filters(0) = 114
swApp.SetSelectionFilters filters, True
If swSelMgr.GetSelectedObjectType(1) = 10 Then
SWDOC.Extension.RunCommand swCommands_Select_Chain, ""
m_page_line.Show
End if
If swSelMgr.GetSelectedObjectType(1) = 114 Then
m_page_block.Show
End If
- Sanjay Phadke
SolidworksApi macros