t2arun
13-02-2004, 12:06 PM
I am having a problem in the following code while using autocad2000
see the following code(adoc is the app object of autocad)
"
Set insertedxref = adoc.ActiveDocument.ModelSpace.AttachExternalRefer ence (gstrAppPath & "\drawings\" & SomeDrawing & ".dwg", SomeBlockName, NewPtLocation, 1#, 1#, 1#, 0#, False)
Set objblock = adoc.Application.ActiveDocument.Blocks.Item(insert edxref.Name)
objblock.Bind False
"
On the above line i get an error saying that object was open for read and it works fine in autocad2002, i need to work in 2000 as well
see the following code(adoc is the app object of autocad)
"
Set insertedxref = adoc.ActiveDocument.ModelSpace.AttachExternalRefer ence (gstrAppPath & "\drawings\" & SomeDrawing & ".dwg", SomeBlockName, NewPtLocation, 1#, 1#, 1#, 0#, False)
Set objblock = adoc.Application.ActiveDocument.Blocks.Item(insert edxref.Name)
objblock.Bind False
"
On the above line i get an error saying that object was open for read and it works fine in autocad2002, i need to work in 2000 as well