Inventor General Discussion

Inventor General Discussion

Reply
Member
3 Posts
0 Kudos
Registered: ‎11-20-2010
Post 1 of 3

massage of replacing if dwg already exists

112 Views, 2 Replies
05-03-2012 04:29 AM
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
Member
3 Posts
0 Kudos
Registered: ‎11-20-2010
Post 2 of 3

Re: massage of replacing if dwg already exists

05-03-2012 04:38 AM 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")
Member
3 Posts
0 Kudos
Registered: ‎11-20-2010
Post 3 of 3

Re: massage of replacing if dwg already exists

05-10-2012 11:12 PM 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!