iLogic, run rule on completion of form

iLogic, run rule on completion of form

msobalvarro
Advocate Advocate
6,911 Views
5 Replies
Message 1 of 6

iLogic, run rule on completion of form

msobalvarro
Advocate
Advocate

I have created an assembly iLogic rule which shows a form which includes parameter entries that I would like to write to custom properties. <see snippet below>

 

 

Sub Main
iLogicForm.Show("FRM_AAI-PROJECT")



'set property value to match parameter
iProperties.Value("Custom", "DISTRIBUTOR") = Parameter("DISTRIBUTOR")
iProperties.Value("Custom", "REP") = Parameter("REP")
iProperties.Value("Custom", "BUILDER") = Parameter("BUILDER")
iProperties.Value("Custom", "ASSIGNED TO") = Parameter("ASGN_TO")
iProperties.Value("Custom", "SLIDE") = Parameter("SLIDE")
iProperties.Value("Custom", "FEEDER") = Parameter("FDR")
iProperties.Value("Custom", "DRIVER") = Parameter("DRVR")
iProperties.Value("Custom", "DRIVER MFG") = Parameter("DRVR_MFG")
iProperties.Value("Custom", "DRIVER MODEL") = Parameter("DRVR_MDL")
iProperties.Value("Custom", "APPR. DWG REQ.") = Parameter("APPR_DWG_REQ")
iLogicVb.UpdateWhenDone = True

    Dim valName As String 
    Dim oDoc As Document = ThisApplication.ActiveDocument
    Dim oAsmCompDef As AssemblyComponentDefinition = oDoc.ComponentDefinition
    Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
    Dim oMatrix As Matrix = oTG.CreateMatrix
    Call oMatrix.SetTranslation(oTG.CreateVector(0, 0, 0))
        
    valName= iProperties.Value("Custom", "SERIAL NUMBER")
        
    Dim oOcc As ComponentOccurrence
    oOcc = oAsmCompDef.Occurrences.AddVirtual(valName & " APPROVAL DWG", oMatrix)
    oOcc = oAsmCompDef.Occurrences.AddVirtual(valName & " KIT LIST", oMatrix)
    oOcc = oAsmCompDef.Occurrences.AddVirtual(valName & " WORK ORDER", oMatrix)
    oOcc = oAsmCompDef.Occurrences.AddVirtual(valName & " MANUAL", oMatrix)
    oOcc = oAsmCompDef.Occurrences.AddVirtual(valName & " REQ MEDIA", oMatrix)
End Sub

 the problem i'm running into is that I do not want the parameters to wriute to custom iProperties until after he form is complete. ie the Done button is pressed.

 

Is there anyway to trigger either a separate rule or trigger continuation of this rule upon completion of the form?

 

 

 

 

 

0 Likes
Accepted solutions (2)
6,912 Views
5 Replies
Replies (5)
Message 2 of 6

jdkriek
Advisor
Advisor
Accepted solution

Separate the logic where you are writing parameters to custom properties into a separate rule.

Then in your form, drag that (new) rule to the iLogic form as a button. Make sure you set the rule to "Don't run automatically".

 

2017-04-10_14-43-23.png

 

Choose the on-click action for the button that best makes sense like "Apply and then Close and then Run Rule".

 

 

2017-04-10_14-58-55.png

 

So you could remove your done button in this case by setting predefined buttons to "None" and just let this new button do everything.

 

2017-04-10_15-06-02.png

 

There are other ways to go about this, but this is the most simplistic. Let me know.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 6

msobalvarro
Advocate
Advocate

Hi Jonathan,

 

Yes that works. Because I am wanting to run two specific rules after the form is filled out, I actually created two buttons, one to update properties,  and another to create the virtual components I need.

 

Capture.JPG

 

I left the Done button in the form to close the form out after the 2 rules have been ran.

 

I am however, interested in other possible approaches to initiating rules upon form closure, I'm pretty sure I can initiate the second rule from the initial rule as well, but will look into that later.

 

I really appreciate your help on this.

 

Mario

0 Likes
Message 4 of 6

raphael.widmann5DUKP
Participant
Participant

Hello guys,

are there any new insights or ideas to this case?

I wanna also run a rule, after clicking "done" on the form. Doesn't pressing the Done button generate any signal?

Many thanks for your reply!

BR

0 Likes
Message 5 of 6

bmc_dowell
Participant
Participant
Accepted solution

Use the "Apply then close then run rule and change the label to done or close

0 Likes
Message 6 of 6

raphael.widmann5DUKP
Participant
Participant

Hi bmc_downwell,

 

would you pls be so kind, to elaborate your proposal more specific?

 

Thank you in advance!

0 Likes