Does anybody have anycode to create a toolbar? found some samples, but none worked
I'll provide you with the logic since you already have the sample.
If you have any doubts or problems, let me know, I'll be here.
Thanks, got it to work.
But, can't seem to update the workspace after. It say's to use
Dim
flName AsString= cs.CUIFileBaseName
Application.DocumentManager.MdiActiveDocument.SendStringToExecute(
"cuiunload " & flName & " ", False, False, False)
Application.DocumentManager.MdiActiveDocument.SendStringToExecute(
"cuiload " & flName & " filedia 1 ", False, False, False)
Also, what class has the commands with the bitmap images?
That's a tricky part >.<
I'll post the C# code for that part.
//We save the settings for CMDECHO (command echo) and FILEDIA (file dialog) object oldCmdEcho = Application.GetSystemVariable("CMDECHO"); object oldFileDia = Application.GetSystemVariable("FILEDIA");
//Set new settings for CMDECHO AND FILEDIA so the partial cuix is seamless Application.SetSystemVariable("CMDECHO", 0); Application.SetSystemVariable("FILEDIA", 0); //At this point I use a bool variable already set lines above to check if the partial cuix was already in the main cuix. newDocument.SendStringToExecute("_.cuiunload " + myCuiName + " ", false, false, false);
//Load the cui newDocument.SendStringToExecute("_.cuiload " + cuiFileToSend + " ", false, false, false); //cuiFileToSend is the full path for the .cuix. If it has spaces it will require double quotes @""C:\My Path is a pretty path\my cui.cuix"" I will always double quote it, you never know.
//Load the old echo and filedia values
newDocument.SendStringToExecute("(setvar \"FILEDIA\" " + oldFileDia.ToString() + ")(princ) ", false, false, false); newDocument.SendStringToExecute("(setvar \"CMDECHO\" " + oldCmdEcho.ToString() + ")(princ) ", false, false, false);