TheMaster

I don't know if testing the owner would help, since avoiding the call tothe base class's WorldDraw() would result in nothing being drawn, andit would prevent ViewportDraw() from being called if the return value ofthe former were false.

TheMaster

Well it looks like I was wrong, and so I've changed the subject of this thread to reflect what it appears to be, that you cannot use DrawableOverrule at all, because the aforementioned bug doesn't apply to only TEXT, it applies to everything.

Here's the output of a tool I was writing to trace WorldDraw calls to blocks and text:

*****Edit*************The first test I followed your steps the others I saved a drawing with a table with block inserted and followed these steps for each drawing-QSave-NetLoad-WorldDrawTest-QSave-KABOOM!

TheMaster

In ObjectARX you would check AcGiCommonDraw::regenType() to handle the proxy graphics generation differently. Perhaps the same can be done here?

Yep - That's one of the workarounds I've tried, but I still can't tell what effect it's having. I think the calls to WorldDraw() are to generate a preview image but can't be sure. I checked the preview image and it seems to show the overruled drawing even though I'm disabling overruling for all WorldDraw() calls nested within the WorldDraw() call on the insertion of the AcDbTable:

*****Edit*************The first test I followed your steps the others I saved a drawing with a table with block inserted and followed these steps for each drawing-QSave-NetLoad-WorldDrawTest-QSave-KABOOM!

I think I tried for 2013 and it did not work but below snips from sending ADN a question how in 2011 setting Overruling to false worked but in 2012 it did not. Now I think about it something might have gotten cached but I think in debugging it with 2012 and Overruling set to false it still called the overriden methods

Quote

Your modified code looks correct. You are basically removing the added overrule from for the line entity in your modified code. I will be consulting my engineering team on your issue (Overrule.Overruling = Not Overrule.Overruling failing in 2012) and I will get back to you as soon as I get some relevant information.

Solution

Quote

As mentioned in earlier mail, you need to remove overrule using API “RemoveOverrule” instead of toggling variable “Overruling”.

Disabling the overrule while the drawing is being saved was one of the solutions I considered, but after giving it some thought, I didn't pursue it, because Overrules are applied to all objects regardless of what database they're in, and that can include objects in databases that aren't open in the editor, and so forth, so that solution would need to hook the Begin/End save events of every single database, which would be a real PITA.

After investigating further, it turns out that this may not be a bug at all, but rather just the nature of the beast, which to summarize, is that customizing the display of compound objects is much more complicated than it might appear at first, and the solution to the problem may lie in overriding SetAttributes() and changing the flags it returns, but I've not had time to play with that yet.