get list of all scales existing on a viewport (layout created by a template)

get list of all scales existing on a viewport (layout created by a template)

Kh.mbkh
Advocate Advocate
785 Views
5 Replies
Message 1 of 6

get list of all scales existing on a viewport (layout created by a template)

Kh.mbkh
Advocate
Advocate

Having a layout created by using a template.

When a new viewport is created, we can manually see a list of all scales we may use (I guess those scales are on the template):

 

Khmbkh_0-1678570273306.png

 

My question is : Is it possible to get that list '(1:1_1 , 1:4 , 1:1 ... ) by Autolisp, and then choose one of them (depending of some things...) .

Thanks

 

0 Likes
Accepted solutions (1)
786 Views
5 Replies
Replies (5)
Message 2 of 6

Sea-Haven
Mentor
Mentor

You dont need to get the list you can decide what scale to use, I use a DCL 

SeaHaven_0-1678575716600.png

Then you can set the viewport scale to match its the property Customscale, metric is easy imperial a little bit harder as take into account feet and inches,  like / scale 12 

 

Ask if you want the dcl. The program allows metric or imperial as you work out the customscale.

0 Likes
Message 3 of 6

pbejse
Mentor
Mentor

@Kh.mbkh wrote:

My question is : Is it possible to get that list '(1:1_1 , 1:4 , 1:1 ... ) by Autolisp, and then choose one of them (depending of some things...) .

Thanks


The custom scale  would be unique only to the selected viewport just because they are not listed on the "ACAD_SCALELIST" dictionary. Maybe we can help you if give us more information on what those "some things"  are?

 

 

0 Likes
Message 4 of 6

Kh.mbkh
Advocate
Advocate
Thank you for the reply!
Let's say the value choosed is 250, so what would be the value to put for vla-put-CustomScale method ?
Is it 250 or (/ 1 250.0) = 0.004 ?
0 Likes
Message 5 of 6

pbejse
Mentor
Mentor

@Kh.mbkh wrote:
Thank you for the reply!
Let's say the value choosed is 250, so what would be the value to put for vla-put-CustomScale method ?
Is it 250 or (/ 1 250.0) 0.004?

Correct! 

0 Likes
Message 6 of 6

Sea-Haven
Mentor
Mentor
Accepted solution

Like Pbejse just make a viewport, have properties open and click on viewport there is the customscale as a variable so see number.

 

Ok your metric so even easier open the Vports toolbar and over on the right is a display of scale you can enter a number in there and the viewport will be exactly rescaled. Its easy to work out number to put in do a rough zoom so mview looks about right a number will appear. Fo a dwg in metres 1:250 = 4 as scale how did I get 4, simple 1000 / 250 = 4, 500=2 similar for mm dwg just different decimal place. 

 

SeaHaven_0-1678690518440.png

 

 

0 Likes