trichardson.155519
2007-12-21, 10:37 PM
I may be premature in posting this, but I've done several searches and I have essentially hit a brick wall.... again.
I'm trying to open a document from a UI. It is a Modal form that is called with Application.ShowModalDialog();
To complicate things somewhat, I will eventually need to open it across the network.
here is what I'm working with:
void buttonAddPlat_Click(object sender, EventArgs e)
{
try
{
using (DocumentLock dl = Application.DocumentManager.MdiActiveDocument.LockDocument())
{
DocumentCollection dm = Application.DocumentManager;
dm.Open("c:\\plat_template.dwg"); //DocumentManager.Open(platTemplate);
//platTemplate = \\server\share
}
}
catch (System.Exception)
{
throw;
}
}
I've tried taking out the document lock (and admittedly, the document is more cryptic to me at this point, I'm still working on learning autocad's functionality)
I'm Still working on this, and if I figure it out, I'll post. If helpful, the form performing the function is called by a parent form which is instantiated by a command method.
Better documentation (or better understanding therein) of the Runtime library might be extremely helpful here.
-TR
I'm trying to open a document from a UI. It is a Modal form that is called with Application.ShowModalDialog();
To complicate things somewhat, I will eventually need to open it across the network.
here is what I'm working with:
void buttonAddPlat_Click(object sender, EventArgs e)
{
try
{
using (DocumentLock dl = Application.DocumentManager.MdiActiveDocument.LockDocument())
{
DocumentCollection dm = Application.DocumentManager;
dm.Open("c:\\plat_template.dwg"); //DocumentManager.Open(platTemplate);
//platTemplate = \\server\share
}
}
catch (System.Exception)
{
throw;
}
}
I've tried taking out the document lock (and admittedly, the document is more cryptic to me at this point, I'm still working on learning autocad's functionality)
I'm Still working on this, and if I figure it out, I'll post. If helpful, the form performing the function is called by a parent form which is instantiated by a command method.
Better documentation (or better understanding therein) of the Runtime library might be extremely helpful here.
-TR