Message 1 of 4
Open and close database
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear all,
I have a problem with opening and closing the database in order to create my custom object to it. The .arx loads successfully, but when i invoke my command i am invite to debug or close the program. AuToCAD 2017 update 1.2 was installed with administrator right.
ARXDbg build fine in VS 2015 community with update 1. No problem at loading in AutoCAD 2017
Can anyone help me with these line of codes?
should i use a void function instead of a AcDbObject createGenerativeLinePrototype function?
What am i missing?
Thank you!!!
cDbDatabase * pGenerativeDb;
AcGePoint3d GenerativeStartPoint(5.0, 5.0, 5.0);
AcGePoint3d GenerativeEndPoint(36.0, 36, 36.0);
//GenerativeLinePrototype4 * pGLine04 = new GenerativeLinePrototype4(GenerativeStartPoint, GenerativeEndPoint);
AcDbEntity* pGLine04 = new GenerativeLinePrototype4(GenerativeStartPoint, GenerativeEndPoint);
AcDbBlockTable* pBlockTable;
acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlockTable, AcDb::kForRead);
AcDbBlockTableRecord *pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite);
AcDbObjectId GenerativeLinePrototype4Id;
pBlockTable->add(GenerativeLinePrototype4Id, pBlockTableRecord);
pBlockTableRecord->appendAcDbEntity(GenerativeLinePrototype4Id, pGLine04);
pBlockTable->close();
pBlockTableRecord->close();
pGLine04->close();
//pGLine04->objectClosed(GenerativeLinePrototype4Id);