iLogic Form Injector?

iLogic Form Injector?

kwilson_design
Collaborator Collaborator
2,423 Views
5 Replies
Message 1 of 6

iLogic Form Injector?

kwilson_design
Collaborator
Collaborator

I know of the awesome Code Injector http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-tri... for injecting iLogic Rules into a batch set of files but I was wondering if such a thing exists for the iLogic Forms? Something similar to the Drawing Resource Wizard where instead of selecting a source drawing I cuold select a source ipt template to copy and paste my iLogic Form into a batch set of files. My iLogic Form is nothing more than iProperty data.

 

Anyone know of something like this out there?

 

Regards,

Kenny

Regards,
Kenny
If this post solved your issue please mark "Accept as Solution". It helps everyone...really!
0 Likes
2,424 Views
5 Replies
Replies (5)
Message 2 of 6

MegaJerk
Collaborator
Collaborator

I'm glad that you are enjoying my tool! I have not had a chance to mess around with any ilogic Form injection, as I made the code injector back with Inventor 2011 in mind (before in-house forms existed). However, I wonder if you couldn’t use a global form to accomplish what you’d like. If not, perhaps you could explain it in more detail, as I have been thinking about picking development up again. 



If my solution worked or helped you out, please don't forget to hit the kudos button 🙂
iLogicCode Injector: goo.gl/uTT1IB

GitHub
Message 3 of 6

kwilson_design
Collaborator
Collaborator

Hey MegaJerk,

 

Basically what I've made is a simple Form that brings in some of the iProperty data (title, special title, part number) as well as looks at a multi-value text parameter called "UM". The Form gets populated when a new part or asy template is ued to create a new part. This saves the engineers lots of time and confusion from having to enter the data manually in the different tabs of the iproperty dialog box. The multi-value parameter is just a list of abbreviated text that serves as a list of our units of measure options that they can assign to the model. I have my drawing part list call on that unit of measure parameter.

 

I prefer not to use external or global rules and forms as we went down that road in the past. Our networks tend to go crazy sometimes so it's not something I want to rely on like we did in the past.

 

I've attached my part file template so you can see how basic and simple our form is. I was doing a huge project for updating all of our models to include this form. So as you can imagine it took me a long time to manually paste in the form lol. But it would be nice if there was such an option in the future. Keep up the great work!

 

Kenny

Regards,
Kenny
If this post solved your issue please mark "Accept as Solution". It helps everyone...really!
0 Likes
Message 4 of 6

MegaJerk
Collaborator
Collaborator

Though I was unable to open your part (running a release behind), if all you’re doing is populating a set of iproperties based on one user selection (from a drop down list), that could be done in ilogic by creating a list box as a work around.

I went on a digging mission into the depths of .dll hell in order to see if there were any clues as to where the information for an internal form is stashed away at. Though I seemed to find some attributes that made reference to the forms, I was unable to spot anything solid.  Oh, the Autodesk.iLogic.UiBuilder.dll did seem like the hottest place to look if anyone else happened to be digging around as well, specifically SaveToFile() – RestoreFromFile() .

 

About the external forms.  Assuming that you already have each user with a copy of the template files locally, you could easily use the xml files generated by an external form in the same way, allowing users to grab them from Vault (or other centralized place (or email as a super back up plan)) to spawn those forms across the board. This also means that you only need to update one thing rather than thousands of things, which is a cheeky bonus. 



If my solution worked or helped you out, please don't forget to hit the kudos button 🙂
iLogicCode Injector: goo.gl/uTT1IB

GitHub
0 Likes
Message 5 of 6

Anonymous
Not applicable

Dear MegaJerk

 

I tried The Tool "Code injector"but i dit not get all of my assemblies in the search list.

After a little check i found that most of our file names are written with capital letters

 

after changing the extentions of the files (in my local directory) to lowercase letters this tool could find all of my files.

 

I hope you can take a look into it.

 

With kind regards

 

John

0 Likes
Message 6 of 6

rschader
Advocate
Advocate
Hi Megajerk, I recently tried using your code injector to inject some ilogic code into my assemblies, and tried it on a couple of them. It seemed to work OK, so I set it up to run as a batch on assemblies across about 100 of my latest projects. Boy, was that a big mistake! Every assembly I subsequently opened had their references changed to the active project at the time I ran the injector, and because of that, when I opened my drawings, the references were corrected, but all my balloon item numbers were out of whack! Luckily, I had cleaned out all my OldVersion folders beforehand, and so I was able to restore all the oldversions using a batch renamer tool to remove the version number and then move them up to the main project directory in only a couple hours. So if you are up for improving this, I would add something so it doesn't do that with assemblies! Would also be nice to specify multiple external rules to add at the same time, using the filename of the rule as the rulename?
0 Likes