Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing AutoCad Blocks from Excel

Status
Not open for further replies.

3576

Programmer
Jan 28, 2005
32
US
I am trying to access autocad block from Excel by using the following code:
Set acadBlockRef = acadDoc.HandleToObject(strHandle)
I am getting an error message: "Type mismatch" even though this statememt works in AutoCAD and MS Access. Please let me know of a way to make this work.

Thanks,

TW
 
Might want to define the acadBlkRef as a variant or object and not a block reference.
 
Thanks for the reply.
I tried that but then I need to GetAttributes and that method is not available with object. Any other suggestion?

TW
 
Assign another variable as a blockreference and then set the acadblkref to it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top