- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Friends,
I have a VBA code that calculate the footprint of a system by multiplying the largest horizontal dimension on the base view and that on the right view. The code loop through all the drawing dimension object and for each one it checks whether it's orientation (By checking DimensionTypeEnum). If horizontal, it will record and find the largest value for base view and right view respectively(By checking the x of dimension origin).
This code runs well for many drawings but not all because on some drawings, some dimensions are kAlignedDimension Type for some reasons(We have thousands of drawings made by different people).
My questions are:
1. Can I do anything else/extra to check the orientation of the drawing dimensions?
2. I know drawing dimension object is under sheet object directly instead of the view object. Is there anyway I can know whether a dimension is on base view or right view, other than checking the coordinates of the dimension origin point?
I am not that knowledgeable in Inventor API. Thank you guys in advance.
Dim oSheet As Sheet
Set oSheet = oDocument.ActiveSheet
Dim oL_FP, oW_FP As Double
oW_FP = 0
If odrawingdim.DimensionType = kHorizontalDimensionType Then
If odrawingdim.Text.Origin.X < (oSheet.Width / 2) And odrawingdim.OverrideModelValue > oL_FP Then
oL_FP = odrawingdim.OverrideModelValue
ElseIf odrawingdim.Text.Origin.X > (oSheet.Width / 2) And odrawingdim.OverrideModelValue > oW_FP Then
oW_FP = odrawingdim.OverrideModelValue
End If
End If
Next
Solved! Go to Solution.