Inventor Customization

Reply
Mentor
kwilsonamerex
Posts: 258
Registered: ‎08-21-2007
Message 11 of 23 (382 Views)

Re: Delete iLogic rule using VBA

06-05-2012 11:32 AM in reply to: kwilsonamerex

Brent,

 

Works like a charm and exactly what I was looking for!

 

Thanks again and best regards,

 

Regards,
Kenny

Corsair 900D ♦ ASUS Maximus VI Extreme ♦ i7 4770k ♦ (3) GTX 780 Ti's ♦ Trident X 32GB ♦ Samsung 840 Pro ♦ WD 1TB Black ♦ SG 1TB ♦ Corsair H100i ♦ Corsair AX1200i ♦ many SP120's
PDS 2014 ♦ Vault 2014 Pro ♦ CFD 2014 ♦ Bunkspeed Pro 2014 ♦ Octane Render ♦ Certified Autodesk Inventor Professional ♦ CAD Manager/Design Engineer
If this post solved your issue please mark "Accept as Solution". It helps everyone...really!
Mentor
kwilsonamerex
Posts: 258
Registered: ‎08-21-2007
Message 12 of 23 (381 Views)

Re: Delete iLogic rule using VBA

06-05-2012 12:33 PM in reply to: kwilsonamerex

Brent,

 

Does your app only work with model files (ipt & iam)? I tried to run it on dwg's and idw's but it doesn't like it. The object is only an inventor model? TIA

Regards,
Kenny

Corsair 900D ♦ ASUS Maximus VI Extreme ♦ i7 4770k ♦ (3) GTX 780 Ti's ♦ Trident X 32GB ♦ Samsung 840 Pro ♦ WD 1TB Black ♦ SG 1TB ♦ Corsair H100i ♦ Corsair AX1200i ♦ many SP120's
PDS 2014 ♦ Vault 2014 Pro ♦ CFD 2014 ♦ Bunkspeed Pro 2014 ♦ Octane Render ♦ Certified Autodesk Inventor Professional ♦ CAD Manager/Design Engineer
If this post solved your issue please mark "Accept as Solution". It helps everyone...really!
Mentor
kwilsonamerex
Posts: 258
Registered: ‎08-21-2007
Message 13 of 23 (371 Views)

Re: Delete iLogic rule using VBA

06-07-2012 08:05 AM in reply to: kwilsonamerex

Brent, I keep getting an unhandled exception rule in cmd prompt when trying to rule on .iam, .dwg and .idw files. Works like a charm on .ipt files though! Getting there and thanks for your help on this!!

Regards,
Kenny

Corsair 900D ♦ ASUS Maximus VI Extreme ♦ i7 4770k ♦ (3) GTX 780 Ti's ♦ Trident X 32GB ♦ Samsung 840 Pro ♦ WD 1TB Black ♦ SG 1TB ♦ Corsair H100i ♦ Corsair AX1200i ♦ many SP120's
PDS 2014 ♦ Vault 2014 Pro ♦ CFD 2014 ♦ Bunkspeed Pro 2014 ♦ Octane Render ♦ Certified Autodesk Inventor Professional ♦ CAD Manager/Design Engineer
If this post solved your issue please mark "Accept as Solution". It helps everyone...really!
Contributor
BrentDouglas
Posts: 18
Registered: ‎04-03-2011
Message 14 of 23 (366 Views)

Re: Delete iLogic rule using VBA

06-07-2012 05:44 PM in reply to: kwilsonamerex

Sorry it's taken so long to get back to you, work has been hectic in the last 2 weeks. I'll try and look at it over the weekend. I probably only tested it on .ipt files when I wrote it. Can you post the stack trace?

 

Brent

Mentor
kwilsonamerex
Posts: 258
Registered: ‎08-21-2007
Message 15 of 23 (353 Views)

Re: Delete iLogic rule using VBA

06-14-2012 08:03 AM in reply to: BrentDouglas

Hey Brent, Sorry its taken me a bit to reply. Been hectic here at work with some other issues. Attached is a text file that I pasted the errors I got when trying to use it on an iam, dwg and idw. Thanks so much for helping me on this! If you're ever in central Alabama I owe you a beer... or two lol

Regards,
Kenny

Corsair 900D ♦ ASUS Maximus VI Extreme ♦ i7 4770k ♦ (3) GTX 780 Ti's ♦ Trident X 32GB ♦ Samsung 840 Pro ♦ WD 1TB Black ♦ SG 1TB ♦ Corsair H100i ♦ Corsair AX1200i ♦ many SP120's
PDS 2014 ♦ Vault 2014 Pro ♦ CFD 2014 ♦ Bunkspeed Pro 2014 ♦ Octane Render ♦ Certified Autodesk Inventor Professional ♦ CAD Manager/Design Engineer
If this post solved your issue please mark "Accept as Solution". It helps everyone...really!
Contributor
BrentDouglas
Posts: 18
Registered: ‎04-03-2011
Message 16 of 23 (346 Views)

Re: Delete iLogic rule using VBA

06-15-2012 01:35 AM in reply to: kwilsonamerex

It should work with idw and dwg's now. I changed the way it takes parameterst to make it a bi more flexible. Now you can specify multiple extensions, rules and paths. e.g. This:

 

C:\Path\To\Unzipped\Folder> ./DeleteRules.exe -t ipt -t dwg -r "First Rule" -r SecondRule C:\Some\Path\To\Files C:\Some\Other\Path\To\More\Files

Will delete both specified rules from all .ipt and .dwg files in both paths. I also changed it to ignore the OldVersions folder that Inventor saves previous versions in.

 

I would try this out on a test copy of your files before running it over your production files.

 

I'm glad to be of assistance Kenny, let me know if it works for you.

 

Brent

Mentor
kwilsonamerex
Posts: 258
Registered: ‎08-21-2007
Message 17 of 23 (335 Views)

Re: Delete iLogic rule using VBA

06-18-2012 01:15 PM in reply to: BrentDouglas

Brent,

 

Thanks for chiming in and editing your program for me.

 

I replaced the "deleterules.exe" of my old one with your new one in the root of all my files I need to edit.

To save time we have a Windows Command Script to make it a simple process to "kick-off" your program.

However when I replaced the deleterules.exe with the new one and clicked on the WCscript, it only shows this (see attached).

In the past it would simply run thru the files. Am I doing something wrong?

 

Again thanks so much for this help. We're gettng there!

 

Regards,
Kenny

Corsair 900D ♦ ASUS Maximus VI Extreme ♦ i7 4770k ♦ (3) GTX 780 Ti's ♦ Trident X 32GB ♦ Samsung 840 Pro ♦ WD 1TB Black ♦ SG 1TB ♦ Corsair H100i ♦ Corsair AX1200i ♦ many SP120's
PDS 2014 ♦ Vault 2014 Pro ♦ CFD 2014 ♦ Bunkspeed Pro 2014 ♦ Octane Render ♦ Certified Autodesk Inventor Professional ♦ CAD Manager/Design Engineer
If this post solved your issue please mark "Accept as Solution". It helps everyone...really!
Contributor
BrentDouglas
Posts: 18
Registered: ‎04-03-2011
Message 18 of 23 (330 Views)

Re: Delete iLogic rule using VBA

06-18-2012 07:01 PM in reply to: kwilsonamerex

I had changed the way you passed parameters to it so it should be faster over a large amount of files (it only has to open each file once rather than once per rule). You specify each file extension as -t ipt or -t dwg and each rule as -r SomeRule. I have attached another copy that should work with the script you had already written though.

 

Brent

Mentor
kwilsonamerex
Posts: 258
Registered: ‎08-21-2007
Message 19 of 23 (321 Views)

Re: Delete iLogic rule using VBA

06-19-2012 11:56 AM in reply to: cidhelp

Brent, Thanks again for chiming in! We've ran it but found one issue. When running it on .dwg files it will bomb out when it "sees" the OldVersions folder. So we've added a little sumin to remove the folder prior to running the rule against dwg files. Take a look :smileyhappy:

 

rmdir "C:\test folder\01000\OldVersions" /S /Q

deleterules "C:\test folder\01000" "cheese puff" -t .dwg

rmdir "C:\test folder\01000\OldVersions" /S /Q

deleterules "C:\test folder\01000" "rule 0" -t .dwg

pause

 

Yes we liike to have fun naming files and folders in the test env :smileyhappy:

 

Regards,
Kenny

Corsair 900D ♦ ASUS Maximus VI Extreme ♦ i7 4770k ♦ (3) GTX 780 Ti's ♦ Trident X 32GB ♦ Samsung 840 Pro ♦ WD 1TB Black ♦ SG 1TB ♦ Corsair H100i ♦ Corsair AX1200i ♦ many SP120's
PDS 2014 ♦ Vault 2014 Pro ♦ CFD 2014 ♦ Bunkspeed Pro 2014 ♦ Octane Render ♦ Certified Autodesk Inventor Professional ♦ CAD Manager/Design Engineer
If this post solved your issue please mark "Accept as Solution". It helps everyone...really!
Valued Contributor
twinz3950
Posts: 66
Registered: ‎02-14-2013
Message 20 of 23 (163 Views)

Re: Delete iLogic rule using VBA

10-31-2013 12:20 PM in reply to: kwilsonamerex

This is an old post, but I have been using the DeletRules.exe form this post and it has worked great; however we have switched to Inventor Pro. 2014 and when I try to  execute the rule it works with .ipt files but errors out when use it for .iam files. Can some one chime in with help on this thanks.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.