INTERSECT Regions ????????

INTERSECT Regions ????????

Anonymous
Not applicable
412 Views
2 Replies
Message 1 of 3

INTERSECT Regions ????????

Anonymous
Not applicable
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
0 Likes
413 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
mniaz,
Just to get you started, you will want to use the Boolean method of your
region objects. It's described in the online help.

Also, here are some discussion groups posts about this;
http://groups.google.com/groups?q=boolean+group:autodesk.autocad.customization.vba

HTH,

James
0 Likes
Message 3 of 3

Anonymous
Not applicable
Hello,
I checked the online help, i also checked the threads available at http://groups.google.com/groups?q=boolean+group:autodesk.autocad.customization.vba but as long as i understood, boolean operation can only be performed two objects only. But in my case i have the selection set of regions. Kindly help me.
Thanks
Mniaz
0 Likes