Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic code

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Aftershock13
549 Views, 3 Replies

iLogic code

Is there a way to use iLogic to select all dimensions? I would like to select all dimensions and change the font size. Any help would be appreciated.

 

Dan

3 REPLIES 3
Message 2 of 4
wimann
in reply to: Aftershock13

Shock,

 

Welcome to the forums. You must be referring to iLogic in an idw. If so, I don't think you would select all dimensions, I think you would try to use iLogic to edit the dimension style. While I'm certain that it is possible, you would likely have to include some VBA code in the ilogic rule as well. If I have a moment, I may try my hand at this. Right now I can't really test it. But going into the task, my approach would be to access the dimension style and edit it's properties through iLogic.

 

Hope this helps.

-Will Mann

Inventor Professional 2020
Vault Professional 2020
AutoCAD Mechanical 2020
Message 3 of 4

Hi Aftershock13,

 

I think wimann is spot on with his suggestion. Here is a quick iLogic rule that will set the font size for the active dimension style.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

'set active document as drawing document
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

Dim oDStyle As DimensionStyle
oDStyle = oDoc.StylesManager.ActiveStandardStyle. _
ActiveObjectDefaults.LinearDimensionStyle

'get current font size
Dim sFontSize as String
sFontSize = oDStyle.TextStyle.FontSize

'get user input
oInput = InputBox("Active Dimesnion Style = " &  oDStyle.Name _
& vblf & vblf &  "Enter a new font size in inches." , "iLogic", _
Round(sFontSize / 2.54,3))

'set font size for dim style
oDStyle.TextStyle.FontSize = oInput * 2.54

 

Message 4 of 4

Curtis / Wimann,

 

That is exactly what I was looking for. It couldn't work any better. I am very appreciative for your help.

 

Dan

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report