Save and replace with iLogic

Save and replace with iLogic

Anonymous
Not applicable
500 Views
2 Replies
Message 1 of 3

Save and replace with iLogic

Anonymous
Not applicable

Hello

 

ist there a way to save and raplece external file with i Logic

 

To frist save in one name and the replace with another

 


'get the part
part = Component.InventorComponent("Glashalter mittig:1")
'open the part
doc = ThisApplication.Documents.Open(part.Definition.Document.FullDocumentName)
'oPath = ThisDoc.Path & "\"
' save the part as step
' doc.SaveAs(oPath & "Glashalter mitte position_" & Position & ".stp" , True)
doc.SaveAs("C:\Users\Aleksandar.Jovicic\Desktop\FGL\Steps\Glashalter mitte.stp" , True)
doc.Replace("Glashalter mitte.stp", "Glashalter mitte " & Position &".stp", True)
' close the part
doc.Close()

0 Likes
501 Views
2 Replies
Replies (2)
Message 2 of 3

MechMachineMan
Advisor
Advisor
wat

--------------------------------------
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 3

Anonymous
Not applicable

What do you mean wat?

 

Files or?

0 Likes