Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic. Copy a drawing file in one folder and save it in another folder

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
smart-cad
722 Views, 4 Replies

iLogic. Copy a drawing file in one folder and save it in another folder

Good afternoon everyone!
How can I copy a drawing file in one folder and save it in another folder?

 

Dim Filedata As String
Dim Filework As String
	
Filedata = ThisDoc.Path + "\DATA\Drawing_1.idw"
Filework = ThisDoc.Path + "\Drawing_1.idw"	
	
	

Select Case OPTION_C
	Case "OPTION-C0"
					
	InventorVb.Application.FileManager.DeleteFile(Filework)				
					
	Case "OPTION-C1"

					
	ThisApplication.Documents.Open(Filedata, False)
	ThisDoc.Document.SaveAs(Filework, True)
	ThisDoc.Document.Close(True)

	Case Else 
		'MessageBox.Show("***", "Title") 
End Select
Tags (1)
Labels (1)
4 REPLIES 4
Message 2 of 5
WCrihfield
in reply to: smart-cad

You can use the following method:

 

Dim oOldNamePath As String = "C:\Temp\MyFolder\MyDrawing.idw"
Dim oNewNamePath As String = "C:\Temp\MyDrawing.idw"
System.IO.File.Copy(oOldNamePath, oNewNamePath, False)

 

System.IO.File.Copy() 

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.

If you want and have time, I would appreciate your Vote(s) for My IDEAS :light_bulb:or you can Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 5
WCrihfield
in reply to: smart-cad

Here's another similar method that can be used in the same way in iLogic (vb.net):

FileIO.FileSystem.CopyFile()

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 4 of 5
smart-cad
in reply to: WCrihfield

My.Computer.FileSystem.CopyFile(Filedata, Filework, False) - works well!
Thank you so much )))
Message 5 of 5
dusan.naus.trz
in reply to: smart-cad

I love you all. I love this site. It's so inspiring. Thanks for being here guys.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report