blocks becoming invisible and visible depending on zoom
Posted: 21 Oct 2009, 22:25
I am using vb.net and 6.0.2824 of the CADImport.net.
We are adding layers and Block References with RealDWG.
When zooming in and out of the drawing, certain blocks appear and disappear based on four factors.
1. If you zoom in a long way all entities appear, If you zoom out some entities disappear at a certain point.
2. If you switch off or freeze one particular layer that we added and put entities on, the missing entities suddenly appear on the other layers.
3. We have some dialog windows that pop up for other functions and if you drag one of these windows over the cadviewer it repaints the 'missing' entities whereever the window travels over one, but whenever cadpicbox.invalidate is invoked to redraw the contents they always disappear again.
4. Bizarrely also, if you drag the drawing around the screen some of the invisible entities reappear at the extremities (four corners of the viewer).
The drawing appears fine at all levels of zoom in the later version's downloadable vb demo and also in dwg trueview.
NOTE: Apart from the disappearance of certain entities based on zoom level, the software is ready and has been shipped to a client, so I don't necessarily wish to recode in a later version of the software if it can be avoided.
Put simply, is there a different way I can refresh the screen or is there something like a different entity selection mode or buffering mode I can use, or is this a known bug in v6? Is it perhaps that I have simply done something wrong with the layers and entities I have been adding?
For me the biggest clues are:-
1. The problem manifests itself with entities and layers added by my code.
2. If you drag a window over the cad viewer the missing entities appear as if by magic, but any call to cadpictbox.invalidate makes them disappear every time.
We are adding layers and Block References with RealDWG.
When zooming in and out of the drawing, certain blocks appear and disappear based on four factors.
1. If you zoom in a long way all entities appear, If you zoom out some entities disappear at a certain point.
2. If you switch off or freeze one particular layer that we added and put entities on, the missing entities suddenly appear on the other layers.
3. We have some dialog windows that pop up for other functions and if you drag one of these windows over the cadviewer it repaints the 'missing' entities whereever the window travels over one, but whenever cadpicbox.invalidate is invoked to redraw the contents they always disappear again.
4. Bizarrely also, if you drag the drawing around the screen some of the invisible entities reappear at the extremities (four corners of the viewer).
The drawing appears fine at all levels of zoom in the later version's downloadable vb demo and also in dwg trueview.
NOTE: Apart from the disappearance of certain entities based on zoom level, the software is ready and has been shipped to a client, so I don't necessarily wish to recode in a later version of the software if it can be avoided.
Put simply, is there a different way I can refresh the screen or is there something like a different entity selection mode or buffering mode I can use, or is this a known bug in v6? Is it perhaps that I have simply done something wrong with the layers and entities I have been adding?
For me the biggest clues are:-
1. The problem manifests itself with entities and layers added by my code.
2. If you drag a window over the cad viewer the missing entities appear as if by magic, but any call to cadpictbox.invalidate makes them disappear every time.