After creatíng a new drawing I want do samething with this new drawing.
After "acDocMgr.MdiActiveDocument = acDoc;" the function stops.
What can I do?
string strTemplatePath = "HBSolarModulplan.dwt";
//New ProjectData Definition
frmProjektData fProjektData = new frmProjektData(false);
Application.ShowModalDialog(fProjektData);
clsACADProjectData hProjectData= fProjektData.ProjectData;
//creating a new drawing
DocumentCollection acDocMgr = Application.DocumentManager;
Document acDoc = acDocMgr.Add(strTemplatePath);
Database db = acDoc.Database;
acDocMgr.MdiActiveDocument = acDoc;
//this doesnt work
hDraw.SetDrawingProperties(hProjectData);
hDraw.SetProjectProperties(hProjectData);
db.TileMode =true;
Regards Jürgen
you may need to change:
Application.ShowModalDialog(fProjektData);
to:
Application.ShowModalessDialog(fProjektData);
@Anonymous wrote:After creatíng a new drawing I want do samething with this new drawing.
After "acDocMgr.MdiActiveDocument = acDoc;" the function stops.
What can I do?
string strTemplatePath = "HBSolarModulplan.dwt";
//New ProjectData Definition
frmProjektData fProjektData = new frmProjektData(false);
Application.ShowModalDialog(fProjektData);
clsACADProjectData hProjectData= fProjektData.ProjectData;
//creating a new drawing
DocumentCollection acDocMgr = Application.DocumentManager;
Document acDoc = acDocMgr.Add(strTemplatePath);
Database db = acDoc.Database;
acDocMgr.MdiActiveDocument = acDoc;
//this doesnt work
hDraw.SetDrawingProperties(hProjectData);
hDraw.SetProjectProperties(hProjectData);
db.TileMode =true;
Regards Jürgen
My apologies for resurrecting an old thread but I am hitting the same issue where I want to create a new drawing and then my function stops processing until I close the new drawing that was opened (which of course doesn't work out since my following lines of code use the drwaing file that was just opened).