View Label - Various Text Sizes

View Label - Various Text Sizes

Tim.Orndorf
Explorer Explorer
191 Views
4 Replies
Message 1 of 5

View Label - Various Text Sizes

Tim.Orndorf
Explorer
Explorer

I'm working on creating a DWG template for our company. This issue I came across is trying to have (2) different text sizes in the view labels (see image; also be nice if the text was centered, that might simply be a change in the Style Editor, I haven't gotten that far).
The top row is to be 1/4"
The bottom row(s) is to be 1/8"
So far it seems that I can't do this w/o an iLogic rule and the one I tried messes the text up to where all text is 1/4" and all on the same line. Unfortunately I'm not quite smart enough to understand what/how to edit the rule (copied from here: Autodesk Forum Topic ).

TimOrndorf_0-1745242629275.png

After running the iLogic rule

TimOrndorf_1-1745242651241.png

 

 

This is the iLogic rule I found

TimOrndorf_2-1745242778243.png

 

 




0 Likes
192 Views
4 Replies
Replies (4)
Message 2 of 5

CGBenner
Community Manager
Community Manager

@Tim.Orndorf 

Hello and welcome!  I moved this post and the post you liked to the Inventor Programming forum for better findability.  Good luck!

Did you find a post helpful? Then feel free to give likes to these posts!
Did your question get successfully answered? Then just click on the 'Accept solution' button.  Thanks and Enjoy!


Chris Benner
Community Manager

Message 3 of 5

marcin_otręba
Advisor
Advisor

hi,

 

it's really hard to help you when you do not provide any data , for example - all labels are the same ?  what is inside?

 

please refer to : Inventor 2025 Help | XML Tags for FormattedText | Autodesk

my suggestion is to use this rule to see how you label is built:

 

Dim sourcelabel As DrawingViewLabel = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewLabelFilter, "choose source label")
Logger.Info(sourcelabel.FormattedText)

 

then you can copy it from logger window and put into your rule :

 

marcin_otrba_0-1745400421944.png

 

Dim oSheets As Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView

oSheets = ThisDoc.Document.Sheets

For Each oSheet In oSheets
	oViews = oSheet.DrawingViews
    	For Each oView In oViews
    		oView.Label.FormattedText = copied text here
    	Next
Next

 

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 4 of 5

J-Camper
Advisor
Advisor

I believe you can do what you want without iLogic.  The StylesManager has a View Preferences section where you can edit the default view label:

JCamper_0-1745455634325.png

 

Let me know if this does not achieve your goal

0 Likes
Message 5 of 5

CGBenner
Community Manager
Community Manager

@Tim.Orndorf 

 

Hello, Did the information provided answer your question? If so, please use Accept Solution so that others may find this in the future. Thank you very much!

Did you find a post helpful? Then feel free to give likes to these posts!
Did your question get successfully answered? Then just click on the 'Accept solution' button.  Thanks and Enjoy!


Chris Benner
Community Manager

0 Likes