InsertBlock using Embarcadero C++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Trying to write a program in C++ that will allow me to insert a dwg file into and existing template. I am using the ObjectArx library compiled for C++.
My error I am revceiving seems to relate to the varriant array needed to pass into the insertblock function.
Actual error is "First chance exception at $007FEABD. Exception class $C0000096 with message 'Privileged instruciton at 0x007feabd'"
Snippet of my code
#include "AutoCAD_TLB.h"
#include "AutoCAD_OCX.h"
void __fastcall Std_Print()
{
VARIANT insertionPnt[3];
String Path1
Path1 = "D:\\TL\\ Paper\\'n";
insertionPnt[0].intVal = 0.0; // x
insertionPnt[1].intVal = 0.0; // y
insertionPnt[2].intVal = 0.0; // z
blockRefObj = acadDoc->PaperSpace->InsertBlock(insertionPnt[3], Path1.c_str(), 1.0, 1.0, 1.0, 0.0);
blockRefObj->Explode();
blockRefObj->Erase();
}
Any help would be appreciated.