Message 1 of 3
Arc Finding

Not applicable
03-07-2002
12:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
-code follows
Sorry I'm kind of new to VBA so hopefully this isn't to trivial...
I'm trying to search a drawing for arcs. My problem is what to declare what I'm looking for. If I set my elem to AcadArc I find arcs but if there are other objects in the drawing it screws up. If i set elem to AcadEntity or Object the search works but then I have trouble reading some of the arc properties. How do i typecast a AcadEntity to an AcadArc?... or do i even have to do this?
Thanks
''''''''''code'''''''''''''''''''''''''''''''''''
Dim elem As AcadEntity
Dim Stuff As AcadArc
For Each elem In ThisDrawing.ModelSpace
If StrComp(elem.EntityName, "AcDbArc", 1) = 0 Then
Set Stuff = ThisDrawing.ModelSpace.elem
''''' Do something with Stuff ''''''''''
End If
Sorry I'm kind of new to VBA so hopefully this isn't to trivial...
I'm trying to search a drawing for arcs. My problem is what to declare what I'm looking for. If I set my elem to AcadArc I find arcs but if there are other objects in the drawing it screws up. If i set elem to AcadEntity or Object the search works but then I have trouble reading some of the arc properties. How do i typecast a AcadEntity to an AcadArc?... or do i even have to do this?
Thanks
''''''''''code'''''''''''''''''''''''''''''''''''
Dim elem As AcadEntity
Dim Stuff As AcadArc
For Each elem In ThisDrawing.ModelSpace
If StrComp(elem.EntityName, "AcDbArc", 1) = 0 Then
Set Stuff = ThisDrawing.ModelSpace.elem
''''' Do something with Stuff ''''''''''
End If