Run Rule after Drawing Update

Run Rule after Drawing Update

Anonymous
Not applicable
1,339 Views
5 Replies
Message 1 of 6

Run Rule after Drawing Update

Anonymous
Not applicable

Hey,

I'd like to have one of my rules run after the User clicks "Update Drawing," but I don't see it in the Event Triggers Menu. Is there any way to add it to there?

 

  -Luke

0 Likes
1,340 Views
5 Replies
Replies (5)
Message 2 of 6

tolgay.hickiran
Advisor
Advisor
Hey Luke,

If you can tell us what you want to achieve we could help you better,

First thing comes to mind is a change on the model parameters, so you could use a really small ilogic rule

iLogicVb.UpdateWhenDone = True

So whenever you change a model parameter this rule will trigger and auto update the model.

Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 3 of 6

Anonymous
Not applicable

I'm creating a drawing template (.idw). Within that template, I have a rule that synchronizes several of the Drawing's iProperties with the Model iProperties. Since my User might not understand this (but they will, ideally, understand the "update drawing" concept), I'd like the rule to run every time they click "update drawing."

 

While the iLogic rule you suggested does indeed update the drawing, I'd like the "Update Drawing" function to run the Rule, not the other way around.

 

Thanks!

0 Likes
Message 4 of 6

tolgay.hickiran
Advisor
Advisor
Like i said, you could put this rule in the event trigger "Change on the Model Parameters" so its not the other way around.

Also, derived drawings automatically update all iproperties from the model itself so i don't understand what you are trying to achieve still. Could you be more specific, share you model maybe

Some worthwhile ideas
Copy Design should rename ilogic Rules too!
Why Nastran In-CAD doesn't have an SDK?IMPLEMENTED!

Tolgay Hickiran
Founding Partner
SignatureSignature

website
emailskypelinkedinyoutubeemail

0 Likes
Message 5 of 6

Anonymous
Not applicable

So, several points.

 

First, I unfortunately can't share my model, so I will attempt to be as descriptive as possible, and I'll include screenshots when necessary.

 

Second, within my drawing template (.idw file), I don't have an event trigger called "Change to the Model Parameters" or anything relating to model parameters changing. My available event triggers are:


New Document
After Open Document
Before/After Save Document
Close Document
iProperty Change
Drawing View Change

 

If you know of a way to add event triggers, please let me know. Google hasn't been able to tell me how, so far.

 

3rd, yes, derived drawings automatically update all iProperties from the model itself. However, lets say I open my Drawing template and place several views of my Model. That .idw file now has two sets of iProperties at its disposal: Drawing iProperties, which are visible when the User clicks the "iProperties" button from the menu, and Model iProperties, which are only (to my knowledge) accessible through iLogic script. These two sets of iProperties can be completely different values.

 

I have successfully written a rule (lets call it Rule1) which takes certain Model iProperties and copies them over to my Drawing iProperties. So lets say I go into the .iam file that the Model is saved in, and I change some iProperties. I have just changed Model iProperties, and any instances where they are directly referenced in my Drawing (the Parts List or Title Block, for example) will be instantly updated. HOWEVER, because I have not yet run my Rule1, the Drawing iProperties will not yet have updated and will be incorrect.

 

Thus, I have a need to auto-run my rule when Model iProperties are changed OR I need to somehow link a rule to the "Update" button.

If you can think of a method to accomplish either of those two methods, I'd love to hear it. Or, if you have a 3rd method, that'd be great, too.

0 Likes
Message 6 of 6

Anonymous
Not applicable
Ah, I think I found where you're getting confused:

The "Any Model Parameter Change" event trigger is only available within a Model file (.ipt or .iam, for example). It is not available within a Drawing (.idw) file.
0 Likes