Problem with Hatches and GetSnapshot

Problem with Hatches and GetSnapshot

max.senft
Enthusiast Enthusiast
482 Views
1 Reply
Message 1 of 2

Problem with Hatches and GetSnapshot

max.senft
Enthusiast
Enthusiast

Hi everybody,

 

I've got some problem with the View.GetSnapshot method: If I want to get a snapshot of BlockReferences that contain polylines, MTexts, hatches, ... the hatches seem to be drawn always on top:

 

test1.png

The right, broken rendering is the actual BlockReference. The left one is the BlockReference without the hatch. The hatch shall lie behind all other components which are: the surrounding circle, the MText "M", the MText "3" and the sine symbol which consists of a polyline and a hatch that fills that polyline.

 

I did not find any possibility to get the whole thing rendered correctly, which is really annoying because it is drawn correctly in the AutoCAD GUI:

 

test1x.png

 

Is anyone out there who can help me? That would be really great! 😉

 

I'm using AutoCAD 2014 with the ObjectARC .NET API and implemented my method by starting with the help from http://through-the-interface.typepad.com/through_the_interface/2007/04/taking_a_snapsh.html

 

Regards

Max

0 Likes
483 Views
1 Reply
Reply (1)
Message 2 of 2

max.senft
Enthusiast
Enthusiast

Hey everybody.

 

I did some further research on the matter. The fact is, that the order defined in the DrawTable is not used. First, I looked up the append order: It is:

  1. MText "3"
  2. Polyline
  3. Circle
  4. MText "M"
  5. Hatch Circle
  6. Hatch Polyline

I found the description of how the draw order is determined in the ObjectARX Managed Class Reference Guide (at the DrawOrderTable Class). So I looked for the draw order in the ACAD_SORTENTS Extension Dictionary. It is:

  1. Hatch Circle
  2. MText "3"
  3. Hatch Polyline
  4. Polyline
  5. Circle
  6. MText "M"

So, the "on screen" renderer seems to use the SORTENTS information correctly, but the off screen renderer not (the append order explains why only the circle hatch and the polyline hatch is visible). Is there any setting/property I could set at the view/device/model (???) to get the snapshot in correct draw order?

 

Best regards

Max

0 Likes