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

Load my custom cui and unload default acad.cui

0 REPLIES 0
Reply
Message 1 of 1
ViaVitae
324 Views, 0 Replies

Load my custom cui and unload default acad.cui

Hello!
I found that I can load my cui file and unload acad.cui file using next code
{code}
string mainCuiFile = (string)Application.GetSystemVariable("MENUNAME");
mainCuiFile += ".cui";
cCurrent = new CustomizationSection(mainCuiFile);

string sCuiName = cCurrent.CUIFileBaseName;
//Unload main cui
Application.SetSystemVariable("FILEDIA", 0);
if (sCuiName != null && sCuiName.Length != 0)
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute(
"cuiunload " + sCuiName + " ",
false, false, false);
}

//Set default directory for my custom CUI file
string sViViCuiFile = "C:\\Users\\Alex\\AppData\\Roaming\\Autodesk\\AutoCAD 2009\\R17.2\\enu\\Support\\ViVi.cui";
cCurrent = new CustomizationSection(sViViCuiFile);
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute(
"cuiload \"" + sViViCuiFile + "\" filedia 1 ",
false, false, false);
{code}
SendStringToExecute function executes asynchronous.
Is there any other way to do the same, but not using SendStringToExecute function.
0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report

”Boost