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

Trying to run PNGOUT or SAVEIMG from .NET

149 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?



Inventor 2013
Posts: 1,417
Registered: ‎04-09-2008
Message 2 of 2 (135 Views)

Re: Trying to run PNGOUT or SAVEIMG from .NET

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

Try suggestion of Tony:


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


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

Autodesk Alert | We are currently working on restoring Previous Version License request access in the Autodesk Subscription Center. If you are a subscription customer and would like to request a Previous Version License, please use this link as a temporary workaround. We apologize for the inconvenience and thank you for your patience.
Need installation help?

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