.NET
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
*Dale Levesque
Passing AutoCAD Object to DLL
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
67 Views, 1 Replies
09-08-2005 08:48 AM
When calling a DLL function from AutoCAD 2002 Visual Lisp I use the
following code and everything works fine.
(setq $acad (vlax-get-acad-object))
(setq vbstrcls (vla-GetInterfaceObject $acad "TestProj2.Class1"))
(vlax-invoke-method vbstrcls "DrawObject" $acad (car mod_ins) (cadr
mod_ins))
If I call the same routine from AutoCAD 2006 I get the following error when
the last line is evaluated:
Program error - Automation Error. QueryInterface for interface
AutoCAD.IAcadApplication failed.
Does anyone know why this is and how to fix it?
Dale
following code and everything works fine.
(setq $acad (vlax-get-acad-object))
(setq vbstrcls (vla-GetInterfaceObject $acad "TestProj2.Class1"))
(vlax-invoke-method vbstrcls "DrawObject" $acad (car mod_ins) (cadr
mod_ins))
If I call the same routine from AutoCAD 2006 I get the following error when
the last line is evaluated:
Program error - Automation Error. QueryInterface for interface
AutoCAD.IAcadApplication failed.
Does anyone know why this is and how to fix it?
Dale
*Dale Levesque
Re: Passing AutoCAD Object to DLL
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-08-2005 08:51 AM in reply to:
*Dale Levesque
Oops, I still had the 2000 library referenced in the DLL. Sorry.
"Dale Levesque" wrote in message
news:4950422@discussion.autodesk.com...
When calling a DLL function from AutoCAD 2002 Visual Lisp I use the
following code and everything works fine.
(setq $acad (vlax-get-acad-object))
(setq vbstrcls (vla-GetInterfaceObject $acad "TestProj2.Class1"))
(vlax-invoke-method vbstrcls "DrawObject" $acad (car mod_ins) (cadr
mod_ins))
If I call the same routine from AutoCAD 2006 I get the following error when
the last line is evaluated:
Program error - Automation Error. QueryInterface for interface
AutoCAD.IAcadApplication failed.
Does anyone know why this is and how to fix it?
Dale
"Dale Levesque"
news:4950422@discussion.autodesk.com...
When calling a DLL function from AutoCAD 2002 Visual Lisp I use the
following code and everything works fine.
(setq $acad (vlax-get-acad-object))
(setq vbstrcls (vla-GetInterfaceObject $acad "TestProj2.Class1"))
(vlax-invoke-method vbstrcls "DrawObject" $acad (car mod_ins) (cadr
mod_ins))
If I call the same routine from AutoCAD 2006 I get the following error when
the last line is evaluated:
Program error - Automation Error. QueryInterface for interface
AutoCAD.IAcadApplication failed.
Does anyone know why this is and how to fix it?
Dale
