I am a begginer using the .net API for autocad, I have some questions:
1) Can I override the "SaveAs..." dialog? I Will show a winform instead of the SaveFileDialog.
2) I know I must create a .dll(with the winform) and a XML file and copy it in the autocad fold, so autocad loads automatically the .dll, right?
I am using visual studio 2010 and autocad 2013.
Thank you very much.
Your question is not so clear to me.
However, for first point- you can show a winform, it is not a problem. Use the command, "Application.showmodaldialog(form_name)".
For 2nd point , what do you mean by xml copy? I did not get. Your DLL will not be automatically loaded in autocad. There are some steps to do that. You can load your DLL manually by using 'Netload' command. for details you can follow :NET developers guide.
you can follow the exercise about that basics of AutoCAD .NET API.
Thanks for the answears.
When I say I must copy the XML file is because I saw a video where you must put the .DLL in a specific folder of autodesk with a XML file(like a manifest file or something like that). I attach a image of the XML file, but thanks for answear.
Well I have a code that by the moment I couldn't check with autocad, is correct the structure?, I have only one form called Guardar. When you insert in Autocad the command "SaveAsEsquema" it creates this form where you can change the name of the file and save it... or this is the idea.
public partial class Guardar : Form
public void SaveActiveDrawing()
guardar =new Guardar();
private void bt_Click(object sender, EventArgs e)
Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
string strDWGName =@"C:\"+ textBox1.Text+".dwg";
your code looks okay. Just run it.
Regarding the xml file, it looks like the autoloader definition is kept there and AutoCAd will read that during start up and load your DLL. if you understand what is written in that xml file, then use it. otherwise you won't be able to rectify any problem later if there is some don't match with your dll. This is why , I recommended you to use manual load first. as you are beginner in .NET API. later you can use demand loader. you can also autoload your dll in dfferent ways. you can see the following link where demand loading is described well.
Access a broad range of knowledge to help get the most out of your products and services.