How to set view label <scale> property to something else than the actual view scale?

How to set view label <scale> property to something else than the actual view scale?

karlg.paulsen
Enthusiast Enthusiast
275 Views
2 Replies
Message 1 of 3

How to set view label <scale> property to something else than the actual view scale?

karlg.paulsen
Enthusiast
Enthusiast

A customer I work for uses dual scales on all view labels on their drawings. One for A1 and one for A3 sheet size. This way they can print the drawing in both A1 and A3  and still have the correct scale.

I want the view label to look like this:

 

SECTION A-A

A1=1:10

A3=1:20

 

In the style library I have formatted the view label like below, but that way I have to manually type in the A3 scale for each new view, or if I change the view scale. Which is annoying and takes time.

 

SECTION <VIEW>-<VIEW><DELIM>
A1=<SCALE>
A3=1 :

 

How do I make a second <SCALE> property to automatically give half the main view scale? 

0 Likes
276 Views
2 Replies
Replies (2)
Message 2 of 3

Michael.Navara
Advisor
Advisor

You need to choose some standard iProperty (user defined iProperty can't be used for this purpose) and set this iProperty with appropriate value (half scale). This iProperty must be updated by some addin or iLogic rule (before save for example). Later on you can add this iProperty to view label template.

0 Likes
Message 3 of 3

mcgyvr
Consultant
Consultant

@karlg.paulsen  Try this and see if it does what you want..

Dim oDrawDoc As DrawingDocument = ThisDrawing.Document 'get the active drawing document

For Each oSheet As Sheet In oDrawDoc.Sheets 'Search through all sheets
   For Each oView As DrawingView In oSheet.DrawingViews 'search through all views
	   If oView.ViewType = 10503 'if its a section view
	   oA3Scale = oView.ScaleString.Substring(oView.ScaleString.IndexOf(":") + 1 ) 'get the second number of the view scale ratio
		'construct/format our new label string
		 oView.Label.FormattedText = "<StyleOverride Underline='True'>Section " & oView.Name & " - " & oView.Name & "</StyleOverride>" & vbCrLf & _
		 "A1 Scale: " & oView.ScaleString & vbCrLf & _
		 "A3 Scale: 1:" & oA3Scale * 2 
	 End If
   Next
Next


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes