ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 6
colander
509 Views, 5 Replies

DrawOrder

Dear All,

I'm trying to put some object behind some others.
There is a line drawn from the centre of a filled circle,
and I like it to show when it leaves the circle.

I Have this:

AcDbBlockTableRecord *block;
acdbOpenObject(block, getBlock(ACDB_MODEL_SPACE), AcDb::kForRead);
AcDbSortentsTable *drawOrder;
block->getSortentsTable(drawOrder, AcDb::kForWrite, Adesk::kTrue);
drawOrder->moveToBottom(lines);
drawOrder->close();
block->close();


Lines is an Array containing all the object ID's
of the lines drawn. And getBlock does what
it says....

Off cousre the lines are still above the circles....

Help?

Thanks,
Bas
5 REPLIES 5
Message 2 of 6
colander
in reply to: colander

For some extra info
the drawOrder->moveToBottom(lines); line
returns eWasOpenForWrite.....
(I changed kForWrite to kForRead, doesn't matter at all....
Message 3 of 6
fantum
in reply to: colander

Just guessing here but are the lines open for write?
Message 4 of 6
colander
in reply to: colander

Nope 😞

It's not that simple.....
Message 5 of 6
colander
in reply to: colander

Okay, Still don't get it, but......

When I put this code in the beginning of my little programme;
AcDbBlockTableRecord *block;
acdbOpenObject(block, getBlock(ACDB_MODEL_SPACE), AcDb::kForRead);
AcDbSortentsTable *drawOrder;
block->getSortentsTable(drawOrder, AcDb::kForWrite, Adesk::kTrue);
drawOrder->close();
block->close();


It works.....

Anybody any clue why this is needed
Message 6 of 6
CompApp
in reply to: colander

I also had the problem described above.

The model space is not allowed to be open for write during the changes you make to the AcDbSortentsTable. So either you close the model space before, or you downgrade open it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost