Error after saving with new file name in Ilogic

Error after saving with new file name in Ilogic

Thomas.Long
Advocate Advocate
719 Views
5 Replies
Message 1 of 6

Error after saving with new file name in Ilogic

Thomas.Long
Advocate
Advocate

I have a program that requires that I use the command manager to save so that it can use a number generator we've developed.

 

However, after the save goes through, everything else in the program throws an error. The problem is I cannot just make the save last because the program also generates the drawing and is supposed to store the new file name and part parameters in a list in an excel sheet.

 

Is there a way to force it to activate the new part and keep the program running? I'm getting the feeling this error is occurring because the rule continues in the old part rather than saving the file and continuing it in the new part. Is there any way to make this work or do I need to make it a little more manual, split it into two rules, have it save and have the user input the new part number so the program can access the rest of the rule in the new part?

 

Thank you all for any help

0 Likes
Accepted solutions (1)
720 Views
5 Replies
Replies (5)
Message 2 of 6

HermJan.Otterman
Advisor
Advisor

Hello Thomas.

 

where is the rule?

in a part?

in an assembly? where the parts are in... (if not: this might work)

 

is this an internal or external rule?

 

 

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 3 of 6

Thomas.Long
Advocate
Advocate

The rule is located in a part but will commonly be accessed from an assembly. It is an internal rule.

Right now I'm trying separate it into different rules and have the rules simply run on open of the new document. That is I mean to set the VBA triggers to inactive (but with the correct triggers in the file) and then turn them on during the rule so that it doesn't create the old drawing or write the old file into my sheet but when the new one saves it will open up with its triggers active.

 

Unfortunately that gave me the error "Catastrophic Failure"

0 Likes
Message 4 of 6

HermJan.Otterman
Advisor
Advisor
Accepted solution

If the iLogic is in a part, and you want the rule to work in an other part, I don't think that will work.

 

If run the rule from an Assembly in witch the parts are in, you can acces all parts and run you rules.

 

an other way would be using VBA or VB.net, you can open , create etc and work with any file

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 5 of 6

Thomas.Long
Advocate
Advocate

I might be able to do an external rule but I'd still have difficulty getting it to import the new file name.

If that's easier with VBA I can try that, though I have a lot less experience working with VBA in Inventor (I haven't worked with parameters in VBA at all yet) though I have experience with VBA overall.

 

Is this particular process a dead end and I need to rework the overall shape of my functions here?

0 Likes
Message 6 of 6

MechMachineMan
Advisor
Advisor

You definitely cannot run an internal rule then close the part the rule is located in without it crashing. You would be better off using an external rule or Macro's to accomplish 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