Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with Hatches and GetSnapshot

1 REPLY 1
Reply
Message 1 of 2
max.senft
396 Views, 1 Reply

Problem with Hatches and GetSnapshot

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

1 REPLY 1
Message 2 of 2
max.senft
in reply to: max.senft

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report