Method DisplayHatch(HideHatch? As Boolean) As Boolean Dim oView As Any = GetHostObject(Me) oView.DisplayHatching = HideHatch? Return oView.DisplayHatching End Method
I need to have a rule from within an IvSectionView design call the method above after the view has been placed to turn off hatching. How can I build this type of dependancy?
Solved! Go to Solution.
Solved by Lesoux. Go to Solution.
Use IvSectionViewModifier.iks.
Add code below to modifier.
Parameter Rule HideHatch? As Boolean = False
Method DisplayHatch(hide As Boolean) As Boolean
Dim oView As Any = GetHostObject(Me)
oView.DisplayHatching = hide
Return oView.DisplayHatching
End Method
<%%category("Render Controls")> _
Rule %%updateSelf As String
parentView.modelSelf
%%ViewLabelDependencies
DisplayHatch(HideHatch?)
Return %%sketchSectionView
End Rule
In Child rule just call parameter rule:
Child viewName As :IvSectionView
...
HideHatch? = True
...
End Child
Something like that. I don't have a chance to test it, but I think you understand my thought.
I just tested it. It works with minor changes (see attached file). Just copy this file to your design files folder and reload Inventor.
Use parameter DisplayHatch? = True/False in the child rule to define hatch visibility.