Author Topic: Loaded Cui files  (Read 5990 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
Loaded Cui files
« on: September 11, 2014, 10:42:31 AM »
Hello everyone,

I want to use a function letting me know if a partial cui file is loaded or not instead of loading it blindly.
I've found a way on that autodesk dev blog :

The only problem is that i am using C++ to do this program and Kean's sample code is in C#.
Therefore, I have some trouble making work this line.

Code: [Select]
string mainCui = Application.GetSystemVariable("MENUNAME") + ".cui";
CustomizationSection cs = new CustomizationSection(mainCui);
PartialCuiFileCollection pcfc = cs.PartialCuiFiles; // <- the incriminated line

My compiler doesnt seems to reach the PartialCuiFileCollection type ("candidate functions are not reachable").
So here is my question : is there any equivalent with C++ or anyone has encountered the same problem before?

Thanks a lot,

PS : Sorry for spelling mistakes.


  • Bull Frog
  • Posts: 448
Re: Loaded Cui files
« Reply #1 on: September 11, 2014, 10:58:42 AM »
Are you using native C++ or managed C++? Which AutoCAD version are you targeting? Which ObjectARX SDK version are you using? Which version of Visual Studio?


  • Guest
Re: Loaded Cui files
« Reply #2 on: September 11, 2014, 11:08:14 AM »

I am using managed C++ with Visual Studio 2010 Professional edition.
I am using object arx 2014 (64bits) for Autocad 2014.

I should have precised all of this, my bad.



  • Guest
Re: Loaded Cui files
« Reply #3 on: September 12, 2014, 06:16:30 AM »
Finally I've resolved my problem on my own, I had some big mess up with differents c++/cli types.

If that can help anyone having the same issue , here is my fix :

Code: [Select]
String^ mainCui = Autodesk::AutoCAD::ApplicationServices::Application::GetSystemVariable("MENUNAME")->ToString();
mainCui = mainCui + L".cuix";
Autodesk::AutoCAD::Customization::CustomizationSection^ cs = gcnew Autodesk::AutoCAD::Customization::CustomizationSection(mainCui);
Autodesk::AutoCAD::Customization::PartialCuiFileCollection^ pcfc = cs->PartialCuiFiles;