.NET

.NET

Reply
Valued Mentor
AubelecBE
Posts: 407
Registered: ‎01-27-2010
Message 1 of 3 (220 Views)
Accepted Solution

Exception on command db.database.saveas(filename,dwgcurrent.curent)

220 Views, 2 Replies
02-02-2012 09:46 AM

my code :

...

InfoFichier = New FileInfo(Txt)
 'enregistrement
dwg.Database.SaveAs(Txt, DwgVersion.Current)

'vérification si fichier existe bien !
If InfoFichier.Exists = True Then
    dwg.CloseAndDiscard()

   ....

 

 

i have buid with framework 3.5.

 

This code work fine with Autocad v2010 but i have a exception with Autocad v2009. (same .dll)

exception DwgVersion.current

 

I have try another DwgVersion.AC1014 and other  but it  crash always on the SaveAS.

 

 

Can you explain this  ?

 

Thx

 

PS : I need to have the same .DLL. (At work, i have computers on Autocad 2009 and v2010). And i dont know how to programm ths VS project for multi buid.)

dwg.Database.SaveAs(strDWGName, True, DwgVersion.Current, _
                                          dwg.Database.SecurityParameters)

*Expert Elite*
arcticad
Posts: 1,286
Registered: ‎06-21-2004
Message 2 of 3 (214 Views)

Re: Exception on command db.database.saveas(filename,dwgcurrent.curent)

02-02-2012 09:54 AM in reply to: AubelecBE

dwg.Database.SaveAs(strDWGName, True, DwgVersion.Current, _
                                          dwg.Database.SecurityParameters)

---------------------------



(defun botsbuildbots() (botsbuildbots))
Valued Mentor
AubelecBE
Posts: 407
Registered: ‎01-27-2010
Message 3 of 3 (190 Views)

Re: Exception on command db.database.saveas(filename,dwgcurrent.curent)

02-03-2012 09:51 AM in reply to: arcticad

Thx.

 

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.