.NET

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

Looking for best way for animating single objects

250 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: 704
Registered: ‎01-24-2003
Message 2 of 7 (236 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: 43
Registered: ‎06-10-2010
Message 3 of 7 (225 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: 704
Registered: ‎01-24-2003
Message 4 of 7 (221 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 (205 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: 43
Registered: ‎06-10-2010
Message 6 of 7 (191 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: 704
Registered: ‎01-24-2003
Message 7 of 7 (176 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.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.