Message 1 of 1
INTERSECT Regions ????????

Not applicable
11-09-2003
07:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Modify menu >> Solids Editing >> Intersect.....I am trying to get Intersection of different regions using VBA. But till now i am not successful. Here is the uncomplete code [[[[[Public Sub OptRegion(ByVal sLayName As String)
On Error Resume Next
Set OptRgn = ThisDrawing.SelectionSets.Item(sLayName)
If Err Then
Err.Clear
Set OptRgn = ThisDrawing.SelectionSets.Add(sLayName)
'Else
'gsset.Clear
'gsset.Delete
End If
'define type of selection set (crossing, window, etc, in this case, all)
Dim mode As Integer
mode = acSelectionSetAll
'this is a selection set filter
Dim gpCode(0) As Integer
Dim dataValue(0) As Variant
gpCode(0) = 8
dataValue(0) = sLayName
'this is selection set filter data
Dim groupCode As Variant, dataCode As Variant
groupCode = gpCode
dataCode = dataValue
'this collects all objects on 'sLayName' layer into the seletion set
OptRgn.Select mode, , , groupCode, dataCode
End Sub]]]]]]]]]]]]]]]
Thanks in advance
Mniaz
On Error Resume Next
Set OptRgn = ThisDrawing.SelectionSets.Item(sLayName)
If Err Then
Err.Clear
Set OptRgn = ThisDrawing.SelectionSets.Add(sLayName)
'Else
'gsset.Clear
'gsset.Delete
End If
'define type of selection set (crossing, window, etc, in this case, all)
Dim mode As Integer
mode = acSelectionSetAll
'this is a selection set filter
Dim gpCode(0) As Integer
Dim dataValue(0) As Variant
gpCode(0) = 8
dataValue(0) = sLayName
'this is selection set filter data
Dim groupCode As Variant, dataCode As Variant
groupCode = gpCode
dataCode = dataValue
'this collects all objects on 'sLayName' layer into the seletion set
OptRgn.Select mode, , , groupCode, dataCode
End Sub]]]]]]]]]]]]]]]
Thanks in advance
Mniaz