Replacements in FRX projects
Read/Update the Profile
ARES Commander doesn’t store the profile in the registry. Instead, it is saved in a XML file in the ARES Commander %APPDATA% folder.
We provide an API in FxARX to read and write profile:
AcApProfileManager::ProfileGetKeyValue //to read a profile setting
AcApProfileManager::ProfileSetKeyValue //to update a profile setting
In both methods, the first parameter is the profile name. In the second parameter, you will specify the profile setting. Please, review the profile.xml to understand the root of each setting. For example to modify/read the profile support paths, you will use:
"/files/support_paths"
or for font paths:
"/files/fonts_paths"
Following code shows how to add programmatically a path to the support paths of the current profile:
Native MDI window functions
As the native MFC functions that you can use in FRX projects for operations such as maximizing, minimizing, and restoring the MDI window run into conflict with Qt events, the MDI window will not be updated properly. To avoid such situation, please replace:
CMDIFrameWnd::MDIMaximize
CMDIFrameWnd::MDIMinimize
CMDIFrameWnd::MDIRestore
Restore MDI window functionality
Move MDI window
and use the methods that FxARX API provides:
void MDIMaximize(CWnd* param_1)
void MDIMinimize(CWnd* param_1)
void MDIRestore(CWnd* param_1)
void MDIMoveWindow( CWnd* param_1, const CRect & rect )
Replace MFC native CStatusBar with CFxUiStatusBar
The use of native MFC CStatusBar objects inside ARES Commander main frame, could run into conflicts with Qt event processing for that kind of controls. Therefore, FxARX API provides the CFxUiStatusBar interface as replacement for the CStatusBar functionality and handles such situations properly.
The following code:
Should be replaced with the following code:
ControlBar/PaletteSet docking and floating status
Do not use native MFC functions to change the status of the FRX DockControlBars. Instead of that, to dock or make the control floating use the function that FxARX SDK provide:
Reading AcDbObjects that are already closed
We strongly recommend to not access to closed objects. Please, get object information before they have been closed.
Example, avoid following case:
it should be written like:
New AcDbTextStyleTableRecord::setFont method not supported
Currently, we don't support the function:
but it is replaced with the function:
Following code shows how to use the function:
Similar situation can be applied to:
which it is not currently supported, but instead can be used:
GsView changes
Currently, we are not supporting AcGsModel Object caching facility to client. Besides that we render the objects on client screen by creating different GsDevice and GsView. For this reason, we recommend to call the update of the GsDevice when the GsView is invalidated:
Another change is when it is use the function AcGsView::dolly:
No support for modules created for other CAD applications
Do not try to load modules that are not compiled with ARES supported SDK. They will fail to load in ARES. Please, share with the API team which modules from other CAD applications, the plugin tries to load.
Please avoid the use of
for the libs that are not built under FxARX SDK.