.NET

.NET

Reply
Active Contributor
46 Posts
1 Kudo
Registered: ‎06-10-2010
Post 1 of 7
Accepted Solution

Looking for best way for animating single objects

268 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
716 Posts
4 Kudos
Registered: ‎01-24-2003
Post 2 of 7

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
46 Posts
1 Kudo
Registered: ‎06-10-2010
Post 3 of 7

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
716 Posts
4 Kudos
Registered: ‎01-24-2003
Post 4 of 7

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
370 Posts
175 Kudos
Registered: ‎05-06-2012
Post 5 of 7

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
46 Posts
1 Kudo
Registered: ‎06-10-2010
Post 6 of 7

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
716 Posts
4 Kudos
Registered: ‎01-24-2003
Post 7 of 7

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
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!