.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why my document object haven't got CloseAndDiscard or CloseAndSave methods

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
yaqiz
786 Views, 4 Replies

Why my document object haven't got CloseAndDiscard or CloseAndSave methods

Hi All,

 

I use AutoCAD 2014, VB.net 2010. I can't see  CloseAndDiscard or CloseAndSave methods under my document object. I would like to close a drawing. What can I do?

 

Thanks 

 

Regards

4 REPLIES 4
Message 2 of 5
Alfred.NESWADBA
in reply to: yaqiz

Hi,

 

have you referenced the AcCoreMgd.dll?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 5
yaqiz
in reply to: Alfred.NESWADBA

Yes.I did I also import
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.ApplicationServices
Imports acApp = Autodesk.AutoCAD.ApplicationServices.Application
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Imports Autodesk.AutoCAD.Geometry

Message 4 of 5
jeff
in reply to: yaqiz

Add

 

Imports Autodesk.AutoCAD.ApplicationServices.DocumentExtension

 

You can also find your answers @ TheSwamp
Message 5 of 5
mzakiralam
in reply to: yaqiz

Below is the code to save or close drawing in ACAD 2014

 

Dim doc As Document = Application.DocumentManager.MdiActiveDocument 
CloseAndDiscard(doc) CloseAndSave(doc, doc.Name)

 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost