07-31-2016
01:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-31-2016
01:09 AM
I need a dimension style that rounds up to next 5mm , in Autocad its part of the settings you can change but in inventor it still doesn't exist.
i thought maybe there's a way with iLogic Or through the 'API Object Model' that this can be done?
Thanks
Solved! Go to Solution.
08-01-2016
02:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-01-2016
02:11 AM
Hi Alex,
Hope my code will be helpful for you
Dim oDrawDoc as DrawingDocument oDrawDoc = ThisApplication.ActiveDocument Dim oDrawingDimension as object For each oDrawingDimension in oDrawDoc.Activesheet.DrawingDimensions.GeneralDimensions Dim oDimValue as Double oDimValue = oDrawingDimension.ModelValue * 10 oDimValue = (Round(oDimValue/5))*5 oDrawingDimension.OverrideModelValue = oDimValue / 10
Next
Note: This will round of only the drawing driven dimension if you delete the dimension and repeat the dimension it will load the default dimension value again you need to run the rule.
08-01-2016
08:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-01-2016
08:53 AM
@Anonymous wow that's a great code! ill give it few tests and see what improvements i can suggest.