ObjectARX

ObjectARX

Reply
Mentor
421232206
Posts: 166
Registered: ‎10-21-2010
Message 1 of 3 (144 Views)
Accepted Solution

any method provided to change the drawing order like the Hatch Dialog

144 Views, 2 Replies
09-04-2012 01:02 AM

hatch_dialog.jpg

Technology change world! Coding change technology! We coders are coding!

Look at the AcDbSortentsTable class in the documentation.

Distinguished Mentor
owenwengerd
Posts: 686
Registered: ‎08-06-2002
Message 2 of 3 (141 Views)

Re: any method provided to change the drawing order like the Hatch Dialog

09-04-2012 05:24 AM in reply to: 421232206

Look at the AcDbSortentsTable class in the documentation.

--
Owen Wengerd
ManuSoft
Mentor
421232206
Posts: 166
Registered: ‎10-21-2010
Message 3 of 3 (132 Views)

Re: any method provided to change the drawing order like the Hatch Dialog

09-04-2012 07:10 PM in reply to: owenwengerd

thanks a lot, and the code below works well.

 

        AcDbObjectIdArray idArr;
        if (!CSelectionGet::smileyfrustrated:SGetFromDWG(idArr,_T(""),NULL,true))
        {
            return;
        }
        AcDbBlockTableRecord *pBtr = NULL;
        if (Acad::eOk != acdbOpenObject(pBtr, Acad_System::GetBlockId(ACDB_MODEL_SPACE), AcDb::kForRead))
        {
            return;
        }
        AcDbSortentsTable *drawOrder = NULL;
        pBtr->getSortentsTable(drawOrder, AcDb::kForWrite, Adesk::kTrue);    
        pBtr->close();
        if (drawOrder)
        {
            drawOrder->moveToTop(idArr);
            drawOrder->close();
        }

Technology change world! Coding change technology! We coders are coding!
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.