Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rule or VBA Macro to change a dimension style for radii

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
torben_schroederXDK86
178 Views, 4 Replies

Rule or VBA Macro to change a dimension style for radii

Hey. 

I have tried my hand at ilogic and VBA a bit. After asking Chat GPT alot and googling alot i came to the conclusion to ask the experts here, as i was not able to find a solution. 

what i want to achieve with this code is to change the dimension for radii from "horizontal" to "aligned". Not more. But i can not seem to get it done. 

i only have a code generated from ChatGPT which doesnt work. 

 

can someone help me out here? 

 

4 REPLIES 4
Message 2 of 5

Please follow the guidelines described HERE and DON'T post code from ChatGPT with syntax errors.

For example object RadiusTextOrientation doesn't exist. 

Message 3 of 5

Okay, my bad. I just wanted to give some kind of "base" trhat can be worked on. I can delete it, if thats whats needed.

I just dont know what exists and what doesnt. Is there some kind of API Database for Inventor that i can look at?

Message 4 of 5

Here is on-line version of API help.

Or off-line version is available from Inventor Help menu

 

2024-06-26_11-49-48.png

Message 5 of 5

Hi,

try this

 

 

 'set active document as drawing document
	Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument
	'get the active dim style
	Dim oDStyle As DimensionStyle = oDoc.StylesManager.ActiveStandardStyle.ActiveObjectDefaults.LinearDimensionStyle
	oDStyle.RadialTextOrientation = DimensionTextOrientationEnum.kInlineAlignedDimensionText

 

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

 

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report