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: 

Change Style for Individual Drawing Dimensions using iLogic

1 REPLY 1
Reply
Message 1 of 2
danmorick
589 Views, 1 Reply

Change Style for Individual Drawing Dimensions using iLogic

I feel as though this should be relatively easy, but I keep getting an error.  I'm trying to make a rule that looks at all dimensions in a drawing and changes the style for ones above a certain value, something like this...

 

For i=1 To DrawDoc.Sheets.Count
	For Each oDim In DrawDoc.Sheets.Item(i).DrawingDimensions
		
	 If oDim.ModelValue <= 60*2.54 Then
	 oDim.Style = "???"
	 End If

	Next
Next

 

I just can't seem to make it happen.  The code loops though the dimensions just fine, but I haven't been able to change the style for each dimension.  Can anyone give me a hint as to what it should look like?

 

Thanks.

1 REPLY 1
Message 2 of 2
adam.nagy
in reply to: danmorick

Hi,

 

As usual the best starting point is if you try to achieve what you want through the UI and then investigate the objects through VBA:

http://adndevblog.typepad.com/manufacturing/2013/10/discover-object-model.html

If no luck, then list the UI steps that you want to automate through the API.

 

Cheers,



Adam Nagy
Autodesk Platform Services

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

Post to forums  

Autodesk Design & Make Report