batch identifying iLogic embedded in .iam and .ipt files.

batch identifying iLogic embedded in .iam and .ipt files.

awatt
Advocate Advocate
785 Views
3 Replies
Message 1 of 4

batch identifying iLogic embedded in .iam and .ipt files.

awatt
Advocate
Advocate

(Inventor 2015 and vault pro 2015)

 

I'm looking at replacing .iLogic in a large number (40000+) of part and assembly files in various directories.  I think the iLogic injector utility and the task scheduler may be of service.

 

The hangup is that I need a way to see which iLogic scripts are in the file.  Some files have iLogic that needs replaced with the same name, others need the existing ilogic deleted and replaced with a new scirpt, and others have multiple routines that may need overwritten or replaced.

 

If I can generate a list of files that use ilogic "x", I can selectively apply the iLogic injector.

 

Is there any way to do this short of VB? I really dread going there.

 

Maybe VBA? Other utilities?

 

0 Likes
Accepted solutions (2)
786 Views
3 Replies
Replies (3)
Message 2 of 4

MechMachineMan
Advisor
Advisor
Accepted solution

VB and VBA are so interchangeable there should be no hang-ups between using the two language.

 

What it sounds like you are more concerned about with whether there is functionality in the Inventor API. Which is yes. Which means you can use the language of your choice to programming something to do the task you wish.

 

A little more searching on the forums and you find that I have written for previous solutions both scripts that will delete existing iLogic rules, copy iLogic rules, and another sheet of documentation to show available iLogic calls.

 

Using these things, you should be able to piece together the solution for what you want.


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 3 of 4

fulvio81
Contributor
Contributor
A good way to achieve that result, is to create an addin that looks inside all docs whenever they open.
Triggering on Open document event could be the solution.

You can compare and replace the content of the rules based on their names and add new rules or delete existing rules if needed.

I have already done it fot my company. Let me know if interested

Fulvio
0 Likes
Message 4 of 4

awatt
Advocate
Advocate
Accepted solution

With some investigation, I've found the functionality in iLogic.  I didn't know a number of things were possible.

 

I didn't know about Imports System.IO for File access.

 

I didn't know about the ThisDoc.Launch( . . ) and .ActiveEditDocument.  That got the 'batch' functionality.

 

I didn't know about the ThisApplication.Application.Addins.ItemById("...") to get the iLogicAddin.Automation and add iLogic using iLogic.

 

But Once those are all put together, It was almost easy.