Inventor iLogic save as

Inventor iLogic save as

mjplaatwerk
Participant Participant
539 Views
4 Replies
Message 1 of 5

Inventor iLogic save as

mjplaatwerk
Participant
Participant

Hi there,

 

Is it possible to save and replace a part from an assembly in iLogic?

 

Thanks for your help.

Marcius Janssen

0 Likes
540 Views
4 Replies
Replies (4)
Message 2 of 5

Thomas_Savage
Advisor
Advisor

Hello,

 

Yes you will be able to do this.

 

Could you attach your model please?

 

Thomas.



Thomas Savage

Design Engineer


0 Likes
Message 3 of 5

mjplaatwerk
Participant
Participant
This is the case.

I've got an assembly (Box-parametric.iam) of a box (Box-parametric.ipt) with
a lid (Lid-parametric.ipt).

With the help of a form in ilogic I can change the dimensions of the box and
the lid within the assembly.

Now I want to "save as" the partfile of the box with a filename that
consists of the word "Box" followed by the dimensions of the box.

I've figured out how to make the correct new filename but I don't know how
to "save as" a partfile from the assembly.

The same goes for the lid.

After the "save as" I want to replace the box (parametric) with the box with
the dimensions in the filename and the same for the lid.

At last I want to "save as" the assembly with the filename followed by the
dimensions.


0 Likes
Message 4 of 5

MechMachineMan
Advisor
Advisor

It really depends on how the rest of your script is coded to understand the best way forward.

 

ONE possible way is as below:

 

'To Save an occurrence:
oSaveName = "C:\PartTest.ipt"
Dim compOcc = Component.InventorComponent("430-1986:1")
compOcc.Definition.Document.SaveAs(oSaveName, True)

'To Save the top level:
oFileNameHere = "C:\ASMTest.iam"
ThisDoc.Document.SaveAs(oFileNameHere, True)

--------------------------------------
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
Message 5 of 5

mjplaatwerk
Participant
Participant

Deur Justin,

 

I've been to busy to try your solution.

As soon as I find the time to proceed I will let you know if it works.

 

Greetings,

Marcius Janssen

0 Likes