CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 4029

CAD tip CAD tip # 12697:

Question CAD 
 %  platform  category 
Q - question

Opposite angle for angular dimensions in Inventor drawings (iLogic).

A - answer How to dimension angles including the value of an opposite angle (to 90°) in Inventor drawings?

If you need to show not only the main value of an angle but also a complementary opposite angle value (to 90°), you can use the following iLogic rule. It adds the "opposite" angle (in parentheses) to a selected, plain angular dimension. The displayed preecision will be the same as in the main dimension.

Any subsequent change of the angle or dimension style will not update the opposite angle dimension dynamically. You will need tu re-apply the rule. You can add an icon for this rule into Inventor ribbon e.g. by using our X-Tools.

The iLogic code:

'Adds opposite (90°) angle to ang.dimension (CAD Studio, 2020,
Dim oSelection As Object = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingDimensionFilter, "Select an angular dimension:")
If IsNothing(oSelection) Then Return
If oSelection.Type <> kAngularGeneralDimensionObject Then
	MsgBox("This is not an angular dimension!", vbCritical, "Inventor")
End If
Dim oDim As AngularGeneralDimension = oSelection
Dim opposíte As Double = 90.0-oDim.ModelValue*180.0/PI 'opposite to 90°
If oDim.Text.FormattedText.Contains("°)") Then 'update
	oDim.Text.FormattedText = "<‍DimensionValue/>" & vbCrLf & "(" & CStr(Round(opposíte,oDim.Precision)) & "°)"
Else 'create
        oDim.Text.FormattedText = oDim.Text.FormattedText & vbCrLf & "(" & CStr(Round(opposíte,oDim.Precision)) & "°)"
End If
oDim.Text.HorizontalJustification = kAlignTextCenter
100% *  CAD 
16.8.2020    2238×  
Prices - CAD eShop:
applies to: Inventor ·

See also:
Tip 13040:iLogic - display information about complexity of an Inventor part.
Tip 12828:How to quickly delete 3rd party links to external objects in Inventor?
Tip 12743:A change in iLogic processing of Excel tables since Inventor 2021.
Tip 12712:How to set the option "Active Window on Save" through iLogic?
Tip 12644:How to identify parts and assemblies imported from STEP/IGES?

Back   All CAD Tips

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Extend your AutoCAD LT productivity with our popular add-on
CADstudio LT Extension More info

Please use these tips at your own risk.
CAD Studio is not responsible for possible problems that may occur as a result of using any of these tips.