Message 1 of 9
appendAcDbEntity

Not applicable
12-02-2001
04:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
I hava a Problem:
While i display a modal Dialog, i want to add, for
example Lines to the Database. When i call the
appendAcDbEntity-function AutoCAD crashes.
Is it in general impossible to modify the database
while a modal Dialog is displayed, or am i just
making something wrong?
Code:
-----------------------------------------
AcDbBlockTableRecord *pModelSpace = NULL;
pModelSpace = GetModelSpace(AcDb::kForWrite);
if(!pModelSpace){
return;
}
AcGePoint3d ptStart(0.0, 0.0, 0.0);
AcGePoint3d ptEnd(50.0, 50.0, 0.0);
AcDbLine *myLine = new AcDbLine(ptStart, ptEnd);
>> Here the program crashes...
pModelSpace->appendAcDbEntity(myLine);
myLine->setColorIndex(4);
myLine->close();
pModelSpace->close();
--------------------------------------
Thanks, for your help
Markus
--
>>Alkohol ist die Ursache und Lösung aller menschlichen Probleme<<
I hava a Problem:
While i display a modal Dialog, i want to add, for
example Lines to the Database. When i call the
appendAcDbEntity-function AutoCAD crashes.
Is it in general impossible to modify the database
while a modal Dialog is displayed, or am i just
making something wrong?
Code:
-----------------------------------------
AcDbBlockTableRecord *pModelSpace = NULL;
pModelSpace = GetModelSpace(AcDb::kForWrite);
if(!pModelSpace){
return;
}
AcGePoint3d ptStart(0.0, 0.0, 0.0);
AcGePoint3d ptEnd(50.0, 50.0, 0.0);
AcDbLine *myLine = new AcDbLine(ptStart, ptEnd);
>> Here the program crashes...
pModelSpace->appendAcDbEntity(myLine);
myLine->setColorIndex(4);
myLine->close();
pModelSpace->close();
--------------------------------------
Thanks, for your help
Markus
--
>>Alkohol ist die Ursache und Lösung aller menschlichen Probleme<<