Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

massage of replacing if dwg already exists

2 REPLIES 2
Reply
Message 1 of 3
hunkvicky
224 Views, 2 Replies

massage of replacing if dwg already exists

Hi I m vikas need ur help
I m saving IDw as dwg file in a specific folder with ilogic code
But I wanna check if I have already saved dwg file there with same name with illogic code
It should show massage
Or should add 01, 02 ,at the end of dwg name
2 REPLIES 2
Message 2 of 3
hunkvicky
in reply to: hunkvicky

strFolder = "F:\Inventor Drgs" ' "\" ' GoExcel.CellValue("MEM.xls", "INPUT", "B14") ' "\" ' GoExcel.CellValue("MEM.xls", "INPUT", "A1") ' "\" ' GoExcel.CellValue("MEM.xls", "INPUT", "D14") '' ThisDoc.FileName(False) 'without extension

strFile = GoExcel.CellValue("MEM.xls", "INPUT", "B14") ' "-" ' GoExcel.CellValue("MEM.xls", "INPUT", "C14")' "-" ' GoExcel.CellValue("MEM.xls", "INPUT", "D14")' "-" ' GoExcel.CellValue("MEM.xls", "INPUT", "P9")' "-" ' GoExcel.CellValue("MEM.xls", "INPUT", "P11")' "-" ' GoExcel.CellValue("MEM.xls", "INPUT", "P12")' "-" ' GoExcel.CellValue("MEM.xls", "INPUT", "P13")' "-" ' GoExcel.CellValue("MEM.xls", "INPUT", "P14")'"-"' GoExcel.CellValue("MEM.xls", "INPUT", "P18")'"-HT"' "-Rev-" ' GoExcel.CellValue("MEM.xls", "INPUT", "E14") 'ThisDoc.FileName(False)

If(Not System.IO.Directory.Exists(strFolder )) Then

System.IO.Directory.CreateDirectory(strFolder)

End If

ThisDoc.Document.SaveAs(strFolder '"\"' rstrFile '(".dwg") , True)

But when this rule will run second time if strfile name is same it won't show massage if replacing but I want that
And wanna have dwg saved with strfile name with adding 01,01 etc at the end

MessageBox.Show("All file formats saved", "File Save")
Message 3 of 3
hunkvicky
in reply to: hunkvicky

hey guyes

comeon please give me a solution.

I just wanna check that when i am saving a idw file as dwg (autocad) file in a directory and that file already exists there

then inventor should show a massege that

 "file already exist there do ypu wanna replace it?"

   "Yes"   "No"

 

 

so guys please help me

waiting ...........................................................

Thanks

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

Post to forums  

Autodesk Design & Make Report