.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
Could please any body give the suggestion on how to save active drawing file with filename..
Regards,
Raman
Solved! Go to Solution.
Re: Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Take a look at the Database.SaveAs Method.
Using AcApp = Autodesk.AutoCAD.ApplicationServices.Application;
//Inside your function
AcApp.DocumentManager.MdiActiveDocument.Database.S
Re: Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks for your post
Please suggest me, how i can give the file name for un saved file.
Regards,
Raman
Re: Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
if you want just to save a drawing:
ApplicationServices.Application.DocumentManager.Md
In this case you should first compare it the file already has an assigned name!
If you want to give the file a new name the use:
Dim tFilename as String = "C:\TEMP\XX.DWG"
Dim tVersion as DatabaseServices.DwgVersion = DatabaseServices.DwgVersion.Current
ApplicationServices.Application.DocumentManager.Md
In this case yo should first check that the file does not exist before you start save!
...assuming you have these Import-settings on top of your file:
Imports Autodesk.AutoCAD
HTH, - alfred -
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Re: Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I am getting below error while saving autocad file with file name. Please help me on this.
Re: Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
to be honest ... can you read the text on your screenshot within your post?
If so let me know what browser you are using.
- alfred -
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Re: Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
From what little I could make out of the screenshot, it looks like it was "eWasOpenForWrite". I could be mistaken though...
Re: Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Yeh.... Sorry....Please check this screen shot.
Re: Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You might need to lry locking the document
using (DocumentLock dLock = AcApp.DocumentManager.MdiActiveDocument.LockDocument()) { string tFilename = @"C:\TEMP\XX.DWG"; Autodesk.AutoCAD.DatabaseServices.DwgVersion tVersion = Autodesk.AutoCAD.DatabaseServices.DwgVersion.Curre nt; AcApp.DocumentManager.MdiActiveDocument.Database.S aveAs(tFilename, tVersion); }
Re: Saving active drawing file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
have you installed the latest servicepacks? Did you run any code before you try to save and does this error also occure if yo udefine a command just doing that save?
To the error itself: it may not be a coding-fault as >>>this search<<< shows multiple appearances of this message.
- alfred -
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------


