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

List of Scales in Drawing

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

filat_0-1660198042993.png

 

Michael.Navara
in reply to: filat

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()