.NET

Reply
Valued Contributor
KevinMacDonald
Posts: 75
Registered: ‎12-15-2012
Message 1 of 2 (142 Views)

Trying to run PNGOUT or SAVEIMG from .NET

142 Views, 1 Replies
02-03-2013 02:31 PM

I have written a command that does various drawing operations, and I would like to effectively save a snapshot of what is on the screen at various times during the process. A few ways I have been able to do this is to create a View and call either GetSnapshot() or RenderToImage(). That works, except RenderToImage() - while it does a great job - is very slow, and GetSnapshot() I can't seem to quite control very well. I can't get a specific viewing area to completely fill the image.

 

An alternative approach I've been trying is using PNGOUT via Document.SendStringToExecute(). However, the problem there is that it cannot run within the current command, so instead they all just queue up and run after my command has exited. 

 

Any suggestions on how I can do this?

 

Thanks

Inventor 2013
Moderator
Alexander.Rivilis
Posts: 1,398
Registered: ‎04-09-2008
Message 2 of 2 (128 Views)

Re: Trying to run PNGOUT or SAVEIMG from .NET

02-04-2013 02:27 AM in reply to: KevinMacDonald

Try suggestion of Tony:

http://forums.autodesk.com/t5/NET/CommandEnded-Event-handling-with-OVERKILL/m-p/3766957#M33298

Document doc = Application.DocumentManager.MdiActiveDocument;
doc.Editor.Command( "_.PNGOUT", "", "");

 


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community