ObjectARX

Reply
Distinguished Contributor
421232206
Posts: 159
Registered: ‎10-21-2010
Message 1 of 3 (128 Views)
Accepted Solution

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

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

hatch_dialog.jpg

Technology change world! Coding change technology! We coders are coding!
Distinguished Mentor
owenwengerd
Posts: 594
Registered: ‎08-06-2002
Message 2 of 3 (125 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
Distinguished Contributor
421232206
Posts: 159
Registered: ‎10-21-2010
Message 3 of 3 (116 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!

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community