Fast mode incompaible module

Fast mode incompaible module

fehrsZBFB9
Advocate Advocate
912 Views
4 Replies
Message 1 of 5

Fast mode incompaible module

fehrsZBFB9
Advocate
Advocate

Switching from AutoCAD 2022 to AutoCAD 2023 I receive the following incompatibility warning from AutoCAD:

Due to an incompatible plugin, fast mode of the Shaded visual style has been disabled for this session.

 

I know about the new fast mode and that it is activated by default if the hardware supports it.  What I don't know is why my module is incompatible. The error message isn't very helpful. Even If I do nothing in the initialization routines It still appears. Othery C++ similar arx-Modules don't produce this warning. Ths seems  to be a result of linking to a dependency or including a specific header. I don't know where to start. Has anyone an idea?

0 Likes
913 Views
4 Replies
Replies (4)
Message 2 of 5

moogalm
Autodesk Support
Autodesk Support

Hi,

 

 

Now we have two 3D kernels, you need to specify the kernel.

The GS must now be referenced from the GS manager or by getting a message from an event handler, and no longer from the database or the drawable graphics interface. The following methods are obsolete and code statements using them most be updated:

 

AcDbDatabase::gsModel()/setGsModel()
AcGiDrawable::gsNode()/setGsNode()

 


If your program previously used AcDbDatabase::gsModel(), update your code to use the GS manager. The following code sample gets the GS model using the GS manager:

 

AcDbHostApplicationServices * pHAS = ::acdbHostApplicationServices();
AcadInternalServices *pAIS = pHAS->acadInternalServices();
AcGsManager* pMgr = pAIS ? pAIS->getAcGsManager() : nullptr;
AcGsModel* pModel = pMgr ? pMgr->gsModel(db) : nullptr;

 


The hasGsModel of the GS manager returns a Boolean based on if the GS model is not null.

 

AcGsManager::hasGsModel()

 


If your program previously used the AcGiDrawable::gsNode() method to update an object, you must now utilize the callback system. The callback system consists of two different message handlers: AcGiDrawableReactor::modified() and AcGiDrawableReactor::erased() . You register or unregister to receive messages about graphics handling with the AcGiDrawableEvent::addReactor and AcGiDrawableEvent::removeReactor() methods.
NOTE:The AcGiDrawable::gsNode()/setGsNode() methods were originally deprecated in AutoCAD 2015, but the methods have now been completely removed from the API.

 

If this doesn't slow can you share the code of failing module ?

 

Message 3 of 5

fehrsZBFB9
Advocate
Advocate

This helped. But where is AcadInternalServices defined?

 

I cannot call  pAIS->getAcGsManager(). I get an incomplete class error. Which haeder should I include?

0 Likes
Message 4 of 5

artc2
Autodesk
Autodesk
AcadInternalServices is an AutoCAD internal only class that is not defined in any public header files because it is not meant to be used by anything other than AutoCAD internal code.

The AcGsManager class isn't an area that I'm familiar with, so I can't tell you what you could use instead. Hopefully Madhukar will be able to provide you with code that doesn't use AcadInternalServices.
0 Likes
Message 5 of 5

Alexander.Rivilis
Mentor
Mentor

@moogalm 

As far as I see ObjectARX SDK 2023 has new class AcGsManager2 which have to be used instead of AcGsManager.

acgs.h has next two definitions of functions:

ACCORE_PORT AcGsManager *acgsGetCurrentGsManager();
ACCORE_PORT AcGsManager2* acgsGetCurrentGsManager2();

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member