AutoCAD Map 3D Developer
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
*Killion, Michael
Hatching LWPolyline based on Object Data
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
57 Views, 1 Replies
07-03-2003 01:57 AM
I figured that I could check for the data in the object data tables using an
if..then, and then close the data table, but I don't see a method like this.
Here is the portion of the code that is not working correctly. At this
point, objEnt1(i) is a LWPolyline obtained by cycling through a selection
set.
bln = objODRecords.Init(objEnt1(i), True, False)
If objODRecords.Record.Item(2).Value = 18 Then
Set objPline(0) = objEnt1(i) 'set the AcadEntity for the
hatch outer loop
Set objHatch =
ThisDrawing.ModelSpace.AddHatch(acHatchPatternType PreDefined, "SOLID", True)
objHatch.AppendOuterLoop objPline
End IF
Am I missing something simple? Am I trying to do something the hard way? any
help is really appreciated. Thanks - mike
if..then, and then close the data table, but I don't see a method like this.
Here is the portion of the code that is not working correctly. At this
point, objEnt1(i) is a LWPolyline obtained by cycling through a selection
set.
bln = objODRecords.Init(objEnt1(i), True, False)
If objODRecords.Record.Item(2).Value = 18 Then
Set objPline(0) = objEnt1(i) 'set the AcadEntity for the
hatch outer loop
Set objHatch =
ThisDrawing.ModelSpace.AddHatch(acHatchPatternType
objHatch.AppendOuterLoop objPline
End IF
Am I missing something simple? Am I trying to do something the hard way? any
help is really appreciated. Thanks - mike
*Killion, Michael
Re: Hatching LWPolyline based on Object Data
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-03-2003 02:01 AM in reply to:
*Killion, Michael
The original; message should have read:
I am trying to use VBA to cycle through a drawing containing LWPolylines
with object data attached. I am able to generate the selection set and use
the Record.Init method to check for object data, read the data to isolate
the items to hatch, but when I try to use the Hatch.AppendOuterLoop
LWPolyline, I get either an invalid input error if the Record.Init is used
with true for editing, or a item is open for read if this method is set to
false.
I figured that I could check for the data in the object data tables using an
if..then, and then close the data table, but I don't see a method like this.
Here is the portion of the code that is not working correctly. At this
point, objEnt1(i) is a LWPolyline obtained by cycling through a selection
set.
bln = objODRecords.Init(objEnt1(i), True, False)
If objODRecords.Record.Item(2).Value = 18 Then
Set objPline(0) = objEnt1(i) 'set the AcadEntity for the
hatch outer loop
Set objHatch =
ThisDrawing.ModelSpace.AddHatch(acHatchPatternType PreDefined, "SOLID", True)
objHatch.AppendOuterLoop objPline
End IF
Am I missing something simple? Am I trying to do something the hard way? any
help is really appreciated. Thanks - mike
I am trying to use VBA to cycle through a drawing containing LWPolylines
with object data attached. I am able to generate the selection set and use
the Record.Init method to check for object data, read the data to isolate
the items to hatch, but when I try to use the Hatch.AppendOuterLoop
LWPolyline, I get either an invalid input error if the Record.Init is used
with true for editing, or a item is open for read if this method is set to
false.
I figured that I could check for the data in the object data tables using an
if..then, and then close the data table, but I don't see a method like this.
Here is the portion of the code that is not working correctly. At this
point, objEnt1(i) is a LWPolyline obtained by cycling through a selection
set.
bln = objODRecords.Init(objEnt1(i), True, False)
If objODRecords.Record.Item(2).Value = 18 Then
Set objPline(0) = objEnt1(i) 'set the AcadEntity for the
hatch outer loop
Set objHatch =
ThisDrawing.ModelSpace.AddHatch(acHatchPatternType
objHatch.AppendOuterLoop objPline
End IF
Am I missing something simple? Am I trying to do something the hard way? any
help is really appreciated. Thanks - mike
