Open, Save/Replace, Close

Open, Save/Replace, Close

Anonymous
Not applicable
352 Views
0 Replies
Message 1 of 1

Open, Save/Replace, Close

Anonymous
Not applicable

Hello

 

I use this iLogic rule to open, save as step and close a part

 

'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)
' close the part
doc.Close()

 

When i use this rule:

'doc.SaveAs(oPath & "Glashalter mitte position_" & Position & ".stp" , True) in my STEP rule i save the part as:

 

Glashalter mitte position_1 (the Position is a parameter linked with excel)

 But when i change the part i allways save a new one and than i have many files like:

 

Glashalter mitte position_1

Glashalter mitte position_2

Glashalter mitte position_3

...

How can i make a rule, when i whant Glashalter mitte position_2, to replace it with Glashalter mitte position_1?

i what just one step file with position_1.2.3....

 

 

0 Likes
353 Views
0 Replies
Replies (0)