List of Scales in Drawing

List of Scales in Drawing

filat
Advisor Advisor
354 Views
1 Reply
Message 1 of 2

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
Accepted solutions (1)
355 Views
1 Reply
Reply (1)
Message 2 of 2

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