iLogic triggered by view placement

iLogic triggered by view placement

jacobus
Participant Participant
257 Views
1 Reply
Message 1 of 2

iLogic triggered by view placement

jacobus
Participant
Participant

Hello All

 

I want a iLogic code to run after i placed a view on a drawing and only apply to the base view that was placed and not all the views already on the drawing.

 

Would be nice if someone can help me with this.

 

Kind regards 

Jacobus 

0 Likes
258 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @jacobus.  I don't believe there is an existing iLogic tool for doing this.  As you can see in the Event Triggers dialog of a drawing, the only event there that sound similar is the "Drawing View Change" event, but that is not the event you are looking for.  There are ways of creating your own custom event handler codes, but even those are fairly limited.  The DrawingViewEvents object only exposes one event named "OnViewUpdate", which is only fired when the model being represented within a view is changed in a way that causes the drawing view to be updated.  It is not fired just by placing a new view on a sheet in your drawing.  And the DrawingEvents object, only exposes one event named "OnRetrieveDimensions", and as you can ques, it is fired when you retrieve model dimensions into your drawing view.  The next closest thing I can think of would be the fairly generic DocumentEvents object, and its OnChange event.  This event is fired a ton though, and can be pretty complicated to set-up code for, and can noticeably effect Inventor's performance while in use, if not set-up extremely efficiently.  And I'm still not 100% sure that 'listening' for this more specific event of placing a view can effectively & reliably be caught this way.  If it were possible, it would most likely be better to set up within an Inventor add-on, rather than as an iLogic rule.  Here is a link to one of my contribution posts about creating custom event handlers using an iLogic rule, that may help give you more insight on the subject.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.

If you want and have time, I would appreciate your Vote(s) for My IDEAS 💡or you can Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes