- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
iLogic to automate "re-apply model properties" to a model sketch within a drawing view
Looking for an iLogic code to automate "re-apply model properties" function within inventor drawing view anytime the model/view is updated. Currently I have a model sketch that I show in my view on the drawing. The sketch has an array of lines that has a specific color assigned to it. When the array adds lines, then snew lines come in without the assigned color in the sketch. I then click "re-apply model properties" after the update the model/view, and this then fixes the new lines to have the correct color. I want to automate this so I don't have to click this button anytime the model/view changes. See attached pic of where this button is in the model browser. Should be an easy solution, I just don't know how to code this button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
People have dome some similar things to this. It seems you're working from assemblies so this should be pretty relevant:
There is no call to just get to that option as a true or false. You have to chase it through the drawing view using the referenced document descriptor. Then filter it out any other items, you have yours named so I imagine this will work very closely to what you're looking for.
What a weird option in the model browser, it even has a hotkey in the drawing view. Good information to know though, it just indirectly solved one of my drawing problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
@brendan6HKZU Did the information provided answer your question? If so, please use Accept Solution so that others may find this in the future. Thank you very much!

Chris Benner
Industry Community Manager – Design & Manufacturing
If a response answers your question, please use ACCEPT SOLUTION to assist other users later.
Also be generous with Likes! Thank you and enjoy!
Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I took the rule from the posted article above. I modified line 4 to match my drawing view number (35) and modified the sketch name on line 17 to match my sketch that is in the drawing. I then get the error message that is posted in the picture below. Please advise on how I can fix this if possible. I think this could work but there is a chance I am not properly applying the code. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, you need to create a geometry proxy for the sketch first:
if oSketch.Name = "Wire/Swage Sketch" Then
Call occ.CreateGeometryProxy(oPartDef.Sketches.Item(oSketch.Name), oSketchProxy)
oView.setIncludeStatus(oSketchProxy, True)
oView.setVisablity(oSketchProxy, True)
End If
Note, this wont re-apply model properties though. once the sketch has already been set to be included, if the sketch properties are then updated eg. line colour, the sketch does not update, even if you run this rule again... to update, perhaps set include status to false, update, then set to true again forcing the IDW to get the sketch again with the updated properties.