.NET

.NET

Reply
Active Contributor
rutar
Posts: 46
Registered: ‎06-10-2010
Message 1 of 7 (258 Views)
Accepted Solution

Looking for best way for animating single objects

258 Views, 6 Replies
06-26-2012 05:15 AM

Hello!

 

Its needed to animate simple closed polyline by transforming it vertices. 

The drawing is huge, and only one polyline needed to animate.

 

Is the using of transform by matrix methods from .NET API, and calling Editor.Regen() after every changing polyline geometry by timer

 -

the best way for animating single object? 

 

 


rutar wrote:

Hello!

 

Its needed to animate simple closed polyline by transforming it vertices. 

The drawing is huge, and only one polyline needed to animate.

 

Is the using of transform by matrix methods from .NET API, and calling Editor.Regen() after every changing polyline geometry by timer

 -

the best way for animating single object? 

 

 


No, it is not.  Regen() will regenerate the entire drawing. You only need to regenerate the object(s) you are animating. You can do that by modifying the objects and then calling the TransactionManager.s QueueForGraphicsFlush() and FlushGraphics() methods, along with the Editor's UpdateScreen() method.

 

Oh, and BTW, you don't have to explain to anyone here why you need to animate objects, that's a common scenario in AutoCAD development especially when you are using a graphical UI (e.g., slider controls) to drive parameters that control the object's appearance.

Distinguished Contributor
eljobe
Posts: 706
Registered: ‎01-24-2003
Message 2 of 7 (244 Views)

Re: Looking for best way for animating single objects

06-26-2012 09:14 AM in reply to: rutar

Can you explain a little more what you mean by animate? Why do you need to do this?

Active Contributor
rutar
Posts: 46
Registered: ‎06-10-2010
Message 3 of 7 (233 Views)

Re: Looking for best way for animating single objects

06-26-2012 12:33 PM in reply to: eljobe

It is needed  to change realtime curve geometry by moving slider controls.

 

 

 

Distinguished Contributor
eljobe
Posts: 706
Registered: ‎01-24-2003
Message 4 of 7 (229 Views)

Re: Looking for best way for animating single objects

06-26-2012 01:04 PM in reply to: rutar

Moving sliders has to do with 'how'. I wanted to know 'why'. Why this kind of user interaction? It doesn't seem very precise.

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 5 of 7 (213 Views)

Re: Looking for best way for animating single objects

06-26-2012 02:53 PM in reply to: rutar

rutar wrote:

Hello!

 

Its needed to animate simple closed polyline by transforming it vertices. 

The drawing is huge, and only one polyline needed to animate.

 

Is the using of transform by matrix methods from .NET API, and calling Editor.Regen() after every changing polyline geometry by timer

 -

the best way for animating single object? 

 

 


No, it is not.  Regen() will regenerate the entire drawing. You only need to regenerate the object(s) you are animating. You can do that by modifying the objects and then calling the TransactionManager.s QueueForGraphicsFlush() and FlushGraphics() methods, along with the Editor's UpdateScreen() method.

 

Oh, and BTW, you don't have to explain to anyone here why you need to animate objects, that's a common scenario in AutoCAD development especially when you are using a graphical UI (e.g., slider controls) to drive parameters that control the object's appearance.

Active Contributor
rutar
Posts: 46
Registered: ‎06-10-2010
Message 6 of 7 (199 Views)

Re: Looking for best way for animating single objects

06-26-2012 11:03 PM in reply to: DiningPhilosopher

Hello!

 

Thank you, that is the answer Im looking for.


DiningPhilosopher wrote:

 

Oh, and BTW, you don't have to explain to anyone here why you need to animate objects, that's a common scenario in AutoCAD development especially when you are using a graphical UI (e.g., slider controls) to drive parameters that control the object's appearance.


 

 

Im coding in C# one simple plug-in to AutoCAD, to draw vehicle swept path.  User can modify vehicle steering/speed parameters - and vehicle swept path boundary (closed polyline) must react immediately, user can realtime evaluate and choose road/intersection geometry, Edge of Travelled Way, max speed, vehicle type.

 

Yes, that's must be common  AutoCAD development scenario, but unfortunately Im not advanced Autodesk developer, and cant find any info about this scenario. 

 

Actually, I remembered that used those methods before.  

 

Thank you very much!

 

 

 

 

 

 

 

Distinguished Contributor
eljobe
Posts: 706
Registered: ‎01-24-2003
Message 7 of 7 (184 Views)

Re: Looking for best way for animating single objects

06-27-2012 07:33 AM in reply to: rutar

rutar wrote:

Hello!

Im coding in C# one simple plug-in to AutoCAD, to draw vehicle swept path.  User can modify vehicle steering/speed parameters - and vehicle swept path boundary (closed polyline) must react immediately, user can realtime evaluate and choose road/intersection geometry, Edge of Travelled Way, max speed, vehicle type.

 

Yes, that's must be common  AutoCAD development scenario, but unfortunately Im not advanced Autodesk developer, and cant find any info about this scenario. 

 

Actually, I remembered that used those methods before.  

 

Thank you very much!


Thank you for sharing. It sounds like an interesting project.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.