CodeGier Posted August 16, 2011 Share Posted August 16, 2011 Hello, my 3D-Path-PIO needs different drawing in plain 2D-View. ActProjection := GetProjection(ActLayer); pathHd:= GetCustomObjectPath(objHd); IF pathHd <> NIL THEN BEGIN IF ActProjection = 6 THEN DrawPIO2D(pathHd) ELSE DrawPIO3D(pathHd); END; The problem: There is no redraw fired, when changing the views. So it draws not correct. Is it possible, to have a redraw of a PIO every time user changes the View? Josef Quote Link to comment
JBenghiat Posted August 17, 2011 Share Posted August 17, 2011 If you just need different views between 3D and 2D/plan, PIO's are designed to be hybrid. That is, any 2D objects you code will be visible when in Top/Plan and 3D objects you code will be visible in any other view. No if/then required. -Josh Quote Link to comment
Miguel Barrera Posted August 17, 2011 Share Posted August 17, 2011 Just to expand on the hybrid design, pio's work similar to symbols. If the symbol only has a 2D component, then the same geometry shows in 2D & 3D view. But if the symbol has both 2D & 3D objects, then the symbol displays the appropriate geometry for the current view. As Josh explained, the 2D & 3D objects need to be included in the code and VW will choose which objects to display. I do wish there was a way to regenerate the pio on a view change. Although the scheme makes it easy to create a hybrid pio, it also adds code that is always compiled no matter the view. When working in 2D, there can be noticeable delays if the compiled 3D objects are very complex. Quote Link to comment
CodeGier Posted August 17, 2011 Author Share Posted August 17, 2011 Josh, Miguel, can't believe it was that easy! Thanks for pushing me in the right direction. Miguel I agree with your statement. It would be a very useful feature to have full control in drawing your hybrid PIO. Josef Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.