Find manual changes in an IDW

Find manual changes in an IDW

S_May
Mentor Mentor
435 Views
2 Replies
Message 1 of 3

Find manual changes in an IDW

S_May
Mentor
Mentor

Hello together,

 

Find manual changes in an IDW by the dear colleagues Robot Mad

 

 

0 Likes
Accepted solutions (1)
436 Views
2 Replies
Replies (2)
Message 2 of 3

S_May
Mentor
Mentor
Accepted solution
'-------------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 ------------------------------------------------
Message 3 of 3

-niels-
Mentor
Mentor
Nice looking code, some remarks:

If the standard dimension color isn't black your code would change it to black when not highlighted.
Isn't there a way to set it back to the style color without having to "hardcode" the color?

Also, you check if the value is hidden or overridden.
Would a change in precision (decimal value) count as overridden?
If not, is it possible to check for that as well?

Niels van der Veer
Inventor professional user & 3DS Max enthusiast
Vault professional user/manager
The Netherlands

0 Likes