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: 

Create a iLogic document Rule with External Rule

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
sgwilliams
1017 Views, 4 Replies

Create a iLogic document Rule with External Rule

I created a form (see image 3)to consolidate all the iProperties that I use into one form. Unfortunately for me the Comments field in the Summary tab of the iProperties is not in the list of available iProperties for my form. So I have to create a way to populate that data from my new form. The research I have done helped me create an External Rule (see image 1) that will look to see if the User Parameter "SetComments" is created and if not it creates the variable for me. The form has a multi line text box that is labeled ECO Notes (Engineering Change Order, FYI) that uses the "SetComments" parameter.
I then created a document rule called "CommentsVariable"(see image 2) to say that my summary comments equal the "SetComments" parameter. And I have to recreate this every time I open an old file (we have tens of thousands in our Vault). I can use the "CommentsVariable" rule in the document and it works fine but if I move the rule to an External rule it won't work. My question is why not? I was taught that any rule that is created as a document rule will also work as a external rule. This one does not. Anyone know why it doesn't and if so is there a fix for it?

Work Station : Custom built, Liquid Cooled, Asus Pro WS X570-ACE Motherboard; AMD Ryzen 9 3900X 3.8 GHz 12-Core Processor; ASUS TUF Gaming NVIDIA GeForce RTX 3060 V2 OC Edition Video Card; 32 GB CORSAIR Dominator Platinum DDR4-2132 Memory ; Samsung 850 EVO 1TB SSD Drive.
4 REPLIES 4
Message 2 of 5
xiaodong_liang
in reply to: sgwilliams

Hi,

 

I gave a test at my side. It looks it can work. The attachment is a video.

 

If you still have the problem, could you provide a demo dataset? The snapshot is not always helpful to diagnose.

Message 3 of 5
sgwilliams
in reply to: xiaodong_liang

Xiaodong, Thanks for the help. I have two rules one an external rule, to see if the parameter is already there and if not then create it. And the second rule to declare the variable which say's the comments feild equals the parameter. The second rule only works as a file rule it will not work as an external rule. Thanks for the effort but this doesn't help me. Our company has a Visual Basic wizard working on another project who is going to spend a day with me getting me squared away. Her is going to help create a shortcut button that will open the form in the Inventor VB Editor. I will post a reply once we are done to let you all know how it worked out. Thanks again for your help.

 

 

 

 

Work Station : Custom built, Liquid Cooled, Asus Pro WS X570-ACE Motherboard; AMD Ryzen 9 3900X 3.8 GHz 12-Core Processor; ASUS TUF Gaming NVIDIA GeForce RTX 3060 V2 OC Edition Video Card; 32 GB CORSAIR Dominator Platinum DDR4-2132 Memory ; Samsung 850 EVO 1TB SSD Drive.
Message 4 of 5
sgwilliams
in reply to: sgwilliams

Ok its working so far. The VB wizard come in and after a couple hours of horsing around it was decided that we did not need the External Rule. We used a VB app called code injector and added the internal rules to all of our ipt files and aim files. I also added the rules to all of our .ipt & .aim templates so any new file created will already have the rules added.

 

Thanks for the help!

Work Station : Custom built, Liquid Cooled, Asus Pro WS X570-ACE Motherboard; AMD Ryzen 9 3900X 3.8 GHz 12-Core Processor; ASUS TUF Gaming NVIDIA GeForce RTX 3060 V2 OC Edition Video Card; 32 GB CORSAIR Dominator Platinum DDR4-2132 Memory ; Samsung 850 EVO 1TB SSD Drive.
Message 5 of 5

Hi, I'm with that same problem. I need to inject an internal rule in old documents. Today we are manually inserting the rule for these cases. Could you explain how did you solved your problem?

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

Post to forums  

Autodesk Design & Make Report