AcGiDrawableOverrule for custom entity not working with 3D graphics system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Community,
this article is related to AcGiDrawableOverrule for custom entity not working with layer overrule for PLOT, where I describe some of the basics of our AcGiDrawableOverrule.
As a short introduction to this current topic: we have created an overrule for a custom entity that overrules color and layer during WorldDraw() or ViewportDraw().
This is working very well with the AutoCAD 2D WHIPS graphics system. Here in this example, the custom entity draws a BTR with
AcDbBlockTableRecordPointer pBTR = nullptr;
pBTR.open(oIdBtr, AcDb::kForRead)
giDraw->rawGeometry()->draw(pBTR);
The color and layer are overruled by the entity oberrule class I have implemented when using the 2D wireframe visual style (2D WHIPS graphics system).
The overrule is enabled, the worldDraw() and the traits are set. Finally, the overrule is disabled again to prevent the use of the overrule for any other entities except our targeted custom entities.
When changing the visual style to any other 3D style where the 3D grahics system is used, the worldDraw() is NOT called and the overrule is not applied.
I have the strong feeling that there still needs to be added some call to some AcGsXXX or AcGiXXX class, but for the heck of it, I can't figure out what the solution could look like. The ObjectArx documentation is not very helpfull, either.
Has anybody seen this behaviour before and/or some suggestion how to fix this?
Thanks for your time and effort!