Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

List of Scales in Drawing

filat
Advisor

List of Scales in Drawing

filat
Advisor
Advisor

How to change the list of available scales in a drawing? Does the API allow this?

filat_0-1660198042993.png

 

0 Likes
Reply
Accepted solutions (1)
305 Views
1 Reply
Reply (1)

Michael.Navara
Advisor
Advisor
Accepted solution

This is how you can read current scales list

 

 

Dim drw As DrawingDocument = ThisDoc.Document 
Dim currentScales As String() = drw.StylesManager.ActiveStandardStyle.PresetScales

logger.Debug(string.Join(vbcrlf,currentScales))

 

 

 

Here is the snippet how to put custom scales list

Dim drw As DrawingDocument = ThisDoc.Document 

Dim requiredScales = New List(Of String)
requiredScales.Add("2 : 1")
requiredScales.Add("1 : 1")
requiredScales.Add("1 : 2")

drw.StylesManager.ActiveStandardStyle.PresetScales = requiredScales.ToArray()