
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Has anyone found a way to write code like this shown in the link below, but for overridden balloons instead? I have tried many variations and can't even get close.
http://inventortrenches.blogspot.com/2011/06/using-ilogic-to-find-dimension.html (Curtis Waguespack blog - excellent blog)
-------------Start of ilogic ------------------------------------------------
' Set a reference to the active document.
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
'Define the drawing dims collection
Dim oDrawingDims As DrawingDimension
'Dim oColor As Inventor.Color
Dim oColor As Color
'Prompt user to choose highlight / un-highlight
Dim booleanParam as Object
booleanParam = InputRadioBox("Select an Option", _
"Hightlight Overrides", "Un-Hightlight Overrides", True, Title := "iLogic")
'Loop through all dimensions and set colors
For Each oDrawingDims In oDoc.ActiveSheet.DrawingDimensions
If booleanParam = True then
'set color to magenta
oColor = ThisApplication.TransientObjects.CreateColor(255, 0, 255)
else
'set color to black
oColor = ThisApplication.TransientObjects.CreateColor(0, 0, 0)
oColor.ColorSourceType = ColorSourceTypeEnum.kLayerColorSource
end if
if oDrawingDims.HideValue = True _
or oDrawingDims.ModelValueOverridden = True then
oDrawingDims.Text.Color = oColor
Else
End if
Next
'-------------End of ilogic ------------------------------------------------
Solved! Go to Solution.