Overuled blocks appear darker.

Overuled blocks appear darker.

Anonymous
Not applicable
3,656 Views
11 Replies
Message 1 of 12

Overuled blocks appear darker.

Anonymous
Not applicable

Hi there,

In some of our polyline overrules we have blocks, the problem is that those blocks are coming in at a darker colour.  It's as if  they are permanently selected.  Has anyone come across this before?

 

Thank you,

 

Maritn.

0 Likes
3,657 Views
11 Replies
Replies (11)
Message 2 of 12

DiningPhilosopher
Collaborator
Collaborator

You might want to rephrase your question because it's vague.

 

What are you doing, with blocks and overrules ?  

0 Likes
Message 3 of 12

Anonymous
Not applicable

Ok, I will try and be more descreiptive.

 

We have a function that applies an Overrule to 2dPolyLine.  The overrule consists of Blocks in the shape of a triangle that are copied along the polyline at a selected distance.  The colour of the triangles is the issue.  Basically we set the triangle block to colour index 2 (yellow), but it displays at a darker yellow.  And that applies for nay colour.  If you move the polyline the blocks colour appears correct, then when you set it back down it goes back to being dark.

 

Thanks,

 

Martin.

0 Likes
Message 4 of 12

Anonymous
Not applicable

I'm just wondering if this is a bug in the worlddraw?  We can't seem to find a solution apart from darken all the other stuff to match the miss coloured block.  Very frustrating.

0 Likes
Message 5 of 12

DiningPhilosopher
Collaborator
Collaborator

Sorry, still really not enough to diagnose the problem, which is probably in your WorldDraw() implementation. 

0 Likes
Message 6 of 12

Anonymous
Not applicable

It is the worlddraw we have overridden, but why would  a block reference in the worlddraw of an overrule be darker?

I have a feeling it's something to do with the fact that it thinks it's being moved even when it's not.

 

Ta,

 

Martin.

0 Likes
Message 7 of 12

Anonymous
Not applicable

We have just ran more tests.  The bug shws up in 2011 & 2012.  BUt the same code ran in 2010 works fine, with no discoloration.  I have attached a sample project.

 

Regards.

 

Maritn.

0 Likes
Message 8 of 12

Anonymous
Not applicable

Oops,

here it is.

PS: Make sure to open the drawing first so the block is loaded into the drawing.

0 Likes
Message 9 of 12

Anonymous
Not applicable

Hi there Balaji,

were you able to re-create the problem were having?

 

Regards,

 

Maritn.

0 Likes
Message 10 of 12

Balaji_Ram
Alumni
Alumni

Hi Martin,

 

Sorry, your post seemed to indicate that you had resolved it 🙂

 

If you still have this issue, let me know and I will try it out right away.

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 11 of 12

Anonymous
Not applicable
Hi there, Yes we still have the issue. The block shows OK in 2010, but not in any other version. Regards, Martin.
0 Likes
Message 12 of 12

Balaji_Ram
Alumni
Alumni

Hello Martin,

 

I could reproduce the behavior in AutoCAD 2013.

 

While the color was darker when the Visual Style was "2d Wireframe", the color seemed proper yellow with Visual Style set to any other style, for ex : Realistic.

 

I am not too sure about the reason for this difference but I have come across such differences in the way the graphics is rendered with visual styles. This could be due to the different graphics engine used by AutoCAD for 2d and 3d graphics.

 

Here is a workaround that you can try and which worked for me :

 

Instead of "wd.Geometry.Draw(BlkRec)", you can try replacing it with "BlkRec.Drawable.WorldDraw(wd)"

 

Hope this helps.

 

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes