How to get psltscale system variables of the specified layout

How to get psltscale system variables of the specified layout

adn019LKFW
Contributor Contributor
409 Views
2 Replies
Message 1 of 3

How to get psltscale system variables of the specified layout

adn019LKFW
Contributor
Contributor

In the example drawing, psltscale of "layout1" is 1, and psltscale of "layout2" is 0. What is the correct way to get the psltscale in the specified layout. Function AcDbDatabase::psltscale() does not provide parameter for specifying layout or modelspace.

0 Likes
Accepted solutions (1)
410 Views
2 Replies
Replies (2)
Message 2 of 3

tbrammer
Advisor
Advisor
Accepted solution

I think the only possible way without switching the layout is to analyze the DXF data of the AcDbLayout.

Here are screenshots of ArxDbg's command SNOOPDB:

LayoutPsltscale.png

You can retrieve the DXF resbuf list like this:

AcDbDatabase *pDB = acdbHostApplicationServices()->workingDatabase();
AcDbObjectId idLayoutDict(pDB->layoutDictionaryId());
ads_name dict;
acdbGetAdsName(dict, idLayoutDict);

struct resbuf* rb = acdbDictSearch(dict, L"Layout1", 0);
if (rb)	{
	// find 100, "AcDbLayout", 1, "Layout1", 70 and get the int value
	acutRelRb(rb);
}

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes
Message 3 of 3

adn019LKFW
Contributor
Contributor

Thank you for your reply, I'll try it.

0 Likes