Run an iLogic rule from a form

Run an iLogic rule from a form

dleesuk
Advocate Advocate
1,072 Views
2 Replies
Message 1 of 3

Run an iLogic rule from a form

dleesuk
Advocate
Advocate

Hi Folks,

 

Does anyone know how I can run an iLogic rule from a form without having the rule button on the form.

 

I have a form which modifies model properties (Title, Checked by Name, Checked by Date, etc.).

 

However, when this form is displayed I'd like to run a rule automatically which checks the properties being edited belong to a part or an assembly file. I don't wish to change any properties associated with the drawing as the title block is populated from the model properties.

 

This is my rule:

'check that the active document is a drawing file
If ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject 
    MessageBox.Show("Please run this rule from a PART or ASSEMBLY file.", "iLogic")
    Exit Sub
End If

 

I can't see a trigger which would do the job.

 

This seems like a fairly simple thing to do, but I just cant seem to figure it out.

 

Any clues??

 

Thank You


Regards

Darren
0 Likes
Accepted solutions (1)
1,073 Views
2 Replies
Replies (2)
Message 2 of 3

JoAntt
Enthusiast
Enthusiast
Accepted solution

You can open the form from rule

 

'Do the things before showing the form

'Then

iLogicForm.Show("MyForm")
0 Likes
Message 3 of 3

dleesuk
Advocate
Advocate
I said it'd be easy

Regards

Darren
0 Likes