TheSwamp

Code Red => .NET => Topic started by: guohq on March 04, 2020, 10:15:34 PM

Title: how to draw a parmanent vector ?
Post by: guohq on March 04, 2020, 10:15:34 PM
I can draw a vector by editor.DrawVector ,but the vector will be cleared when the view is update. how can I draw a  parmanent vector?
Title: Re: how to draw a parmanent vector ?
Post by: MickD on March 04, 2020, 10:38:28 PM
maybe this -> https://www.theswamp.org/index.php?topic=25653.0

or draw a line?
:)
Title: Re: how to draw a parmanent vector ?
Post by: guohq on March 05, 2020, 12:47:08 AM
Editor.DrawVector has the same effect as Editor.DrawVectors. Editor.DrawVector can  only darw one vector at a time. Editor.DrawVectors can draw multiple vectors at once.
Title: Re: how to draw a parmanent vector ?
Post by: gile on March 05, 2020, 02:02:36 AM
Hi,

As far as I know, this is the way AutoCAD 'vectors' behave. What about using Line entities instead ?
Title: Re: how to draw a parmanent vector ?
Post by: Maxence on March 05, 2020, 04:38:46 AM
You need to use transient graphics: https://adndevblog.typepad.com/autocad/2012/04/using-transient-graphics.html
Title: Re: how to draw a parmanent vector ?
Post by: guohq on March 05, 2020, 06:40:26 AM
Using TransientManager.AddTransient method is much better than Editor.DrawVector.It would be great if it doesn't disappear when using Regen.