Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Force a rule to Evaluate

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
664 Views, 3 Replies

Force a rule to Evaluate

	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?

3 REPLIES 3
Message 2 of 4
Lesoux
in reply to: Anonymous

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.

Win10 x64
Xeon E5-1630
32 Gb RAM
Quadro K5200

Inventor 2020.3.4, Build 373
Message 3 of 4
Lesoux
in reply to: Lesoux

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.

Win10 x64
Xeon E5-1630
32 Gb RAM
Quadro K5200

Inventor 2020.3.4, Build 373
Message 4 of 4
Anonymous
in reply to: Lesoux

That did it thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report