Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to add the ilogic rule to Inventor automatically when product launching

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
weiloon
5204 Views, 7 Replies

How to add the ilogic rule to Inventor automatically when product launching

I have an ilogic rule:

 

Dim odrawdoc As DrawingDocument
odrawdoc = ThisDrawing.Document
Dim odoc As Document
Try
odoc = ThisDrawing.ModelDocument
odoc.PropertySets.Item("Summary Information").Item("Revision Number").Value = odrawdoc.PropertySets.Item("Summary Information").Item("Revision Number").Value
Catch
End Try

 

The detail of the rule you may refer to the post

http://forums.autodesk.com/t5/Autodesk-Inventor/Automatic-Update-of-Model-Revision-Number/m-p/305871...

 

The way i add the rule to my drawing is

''go to ilogic panel, click on add rule and paste the program into the blank area then hit apply''

and i need to repeat the process for every drawing

Is there any way to make program load automatically?

 

 

7 REPLIES 7
Message 2 of 8
pcrawley
in reply to: weiloon

Edit your drawing template file and add it there.

Next time you create a drawing, the rule will already be waiting for you.

 

If you are trying to add it to old drawings (or a batch of drawings) use this awesomeness: 
http://beinginventive.typepad.com/being-inventive/2012/08/major-upgrade-to-the-ilogic-code-injector-...

 

Peter

 

Peter
Message 3 of 8
rhasell
in reply to: pcrawley

In addition to the above post.

 

Do you need to trigger it, (have it run Automatically)?

If so, then add it to the Event triggers in your template.

 

Select Ribbon "Manage" tab

Under the iLogic section click on "Event triggers"

-- going by the thread you followed, this code was set to Trigger the rule "Before save".

If this is the case then, click on "Before Save"

Click on "Select rules"

Select your Newely placed rule.

Save the template.

 

event trigger.PNG

Reg
2024.2
Please Accept as a solution / Kudos
Message 4 of 8
weiloon
in reply to: rhasell

Rhasell & Pcrawley,

 

Thanks for your fast response and straight forward right to the point support.

 

 

Regards,

Wei Loon

Message 5 of 8
rhasell
in reply to: weiloon

Only a pleasure mate, thats what the forum is all about.

 

Reg
2024.2
Please Accept as a solution / Kudos
Message 6 of 8
parth.vpatel
in reply to: rhasell

Hello

 

I am parth.

 

We need some help.

 

I have complated the assembly of Vanity with ilogic rule and forms.now i have working on vanity drawing generation so we need help for ilogic drawing rule and forms.i don't no how to start ilogic drawing rule and forms. 

 

please help me.

 

Regards

Parth

 

 

Message 7 of 8
rhasell
in reply to: parth.vpatel

Hi Parth.

 

The iLogic forms and rules are the same as for the Part and Assembly environment.

 

Check to see if your iLogic panel is displayed.

 

dwg-ilogic form.png

 

This will be displayed on the ribbon, under mange.

From there you can select "iLogic Browser" to display the rules and forms browser.

 

Hopefully I have answered your question, that should get you started.

 

Then you can add any rules and forms to your template if you so desire.

I have personally placed most of my rules as external, and my forms as global.

There is only one rule in my template, as it does not fire unless it is local to the part. (In other words, it does not work correctly as an external rule)

 

 

Reg
2024.2
Please Accept as a solution / Kudos
Message 8 of 8
parth.vpatel
in reply to: rhasell

Thank you for replay,

 

I need One more help.

 

How to create new assembly and drawing with an exiting ilogic assembly.

 

PLease Suggest

 

Regards,

Parth

 

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

Post to forums  

Autodesk Design & Make Report