Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Q) Working together iLogic Form and Rule.

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
567 Views, 2 Replies

Q) Working together iLogic Form and Rule.

Sorry about my English skills.

 

I am in trouble.

 

What i want to know about iLogic function..

 

I put the code on VBA. the code function to make a custom button. it is working.

 

but, what make me in trouble is..

 

I made a? ?iLogicform.Showglobal("BOM") and also made a rule as well.

 

I seriously want to know how to the rule work automatically. when i put value in form and after click OK button.

 

There is my code about Rule

 

iLogicForm.ShowGlobal("BOM")

' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

' Set a reference to the active sheet.
Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet

If (ThisDrawing.ModelDocument Is Nothing) Then Return
modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
'read the values from the iProperties in the part file
'and apply them to the iProperties with the same name in the drawing

iProperties.Value(modelName, "Summary", "Category")=iProperties.Value("Summary", "Category")
iProperties.Value(modelName, "Project", "Description") = iProperties.Value("Project", "Description")
iProperties.Value(modelName, "Summary", "Title")=iProperties.Value("Summary","Title")
iProperties.Value(modelName, "Summary", "Keywords") = iProperties.Value("Summary", "Keywords")
iProperties.Value(modelName, "Status", "Status") = iProperties.Value("Status", "Status")
iProperties.Value(modelName, "Project", "Designer")=iProperties.Value("Project", "Designer")
iProperties.Value(modelName, "Status", "Eng. Approved By") = iProperties.Value("Status", "Eng. Approved By")
iProperties.Value(modelName, "Project", "Project")=iProperties.Value("Project", "Project")
iProperties.Value(modelName, "Summary", "Subject")=iProperties.Value("Summary","Subject")
iProperties.Value(modelName, "Project", "Revision Number") = iProperties.Value("Project", "Revision Number")

iLogicVb.UpdateWhenDone = True


Question Summary.(Capture)

When i put some Value in BOM and then push OK or Apply button (3). then It should be put the ("value") in (4).

but it is not working. if i push button (1) again then it is working..

 

I want to know how to work that function without push the button (1) again.

Labels (1)
2 REPLIES 2
Message 2 of 3
A.Acheson
in reply to: Anonymous

@Anonymous 


The reason you are having to press the button twice to see the change is because  the  rule needs to run to update. 
2 ways

1. Manual update.

Create an update/refresh button on  the form and place the rule as this button.

2. Auto update :

Place an events trigger to run  rule before save. This will update the form.

 

 

 

https://knowledge.autodesk.com/support/inventor/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/Inventor-iLogic/files/GUID-A5262025-BB42-4707-8BA0-C0ED830FF3BD-htm.html

 

Video of setting an event trigger.

And also using a rule to trigger the command (button) for model to drawing iproperties mapping.

 

https://m.youtube.com/watch?v=hXnbYUP5XZo

 


Another global form.

http://blog.ads-sol.com/2015/04/edit-iproperties-with-global-forms.html?m=1

 

 

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 3
Anonymous
in reply to: A.Acheson

Thank you. Alan

 

That is not exactly i wanted a answer. but It is also good for me.

 

Now, I am trying to change my process with EventTrigger.

 

I think that is possible to change for my program.

 

Thank you so much.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report