ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get the "enabled" AcDbViewportTableRecord

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
214 Views, 1 Reply

How to get the "enabled" AcDbViewportTableRecord

Hi all!

How can I get the AcDbViewportTableRecord in which the user
clicked last, the one which is currently active for drawing?

My Problem is, that I have inserted three AcDbViewportTableRecords
in my drawing and now I want to know the "viewDirection" of the
currently active.

How can I do this?

Code snip:

for(pIter->start(); !pIter->done(); pIter->step()){
if(pIter->getRecord(pTableRecord, AcDb::kForRead) ==
Acad::eOk){
szName = NULL;
pTableRecord->getName(szName);
normal = pTableRecord->viewDirection();
pTableRecord->close();
}
}

With this code I get all three Records and all three have
the name "*Active".

thanks in advance
Markus
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

If the *Active viewport records are up to date, then the first one in the
table contains the data from the currently active viewport. To make sure
the *Active viewport records are up to date, you should call
acedVports2VportTableRecords() to make AutoCAD write a new set of up to date
*Active records.

"Markus Griesser" wrote in message
news:812FA7EF9068A48ED40C7B4486E681CA@in.WebX.maYIadrTaRb...
> Hi all!
>
> How can I get the AcDbViewportTableRecord in which the user
> clicked last, the one which is currently active for drawing?
>
> My Problem is, that I have inserted three AcDbViewportTableRecords
> in my drawing and now I want to know the "viewDirection" of the
> currently active.
>
> How can I do this?
>
> Code snip:
>
> for(pIter->start(); !pIter->done(); pIter->step()){
> if(pIter->getRecord(pTableRecord, AcDb::kForRead) ==
> Acad::eOk){
> szName = NULL;
> pTableRecord->getName(szName);
> normal = pTableRecord->viewDirection();
> pTableRecord->close();
> }
> }
>
> With this code I get all three Records and all three have
> the name "*Active".
>
> thanks in advance
> Markus

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

Post to forums  

Autodesk Design & Make Report

”Boost