Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I access Export images options?

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
nick
916 Views, 8 Replies

How do I access Export images options?

How do I access Export images options?
These are the options highlighted in Red in the image attached 
 
These are similar to the Print settings that are accessed by PrintParameters but I can't find this for images?
"PrintParameters.HideReforWorkPlanes" is what I want to access but for image export.
 
I seems that the Revit API has no access to these options and that the defult or last used options are used when images are export using the API.
 
Here is my problem, I want to export images showing reference planes.
If the user has the "Hide ref/work planes" on.
I can't check or turn this setting on using the API.
My exported images will not show reference planes.
 
See PDF file from the RevitAPI.chm attached, ImageExportOptions and PrintParameters
 
 
8 REPLIES 8
Message 2 of 9
nick
in reply to: nick

Here is the code I have so far,
//export settings
ImageExportOptions imageExOp = new ImageExportOptions();
imageExOp.ExportRange = ExportRange.CurrentView;
imageExOp.HLRandWFViewsFileType = ImageFileType.PNG;
imageExOp.ShadowViewsFileType = ImageFileType.PNG;
imageExOp.ShouldCreateWebSite = false;
imageExOp.Zoom = 100;
imageExOp.ZoomType = ZoomFitType.Zoom;

 

there is no imageExOp.HideReforWorkPlanes

Message 3 of 9
jeremytammik
in reply to: nick

Dear Nick,

 

Thank you for your query and for submitting it here in the public forum.

 

I am sorry to say that do not currently see any API access to this functionality.

 

Surprisingly for me, I could not find a wish list item for it either.

 

I therefore submitted the wish list item CF-4292 [API wish: access Image Export Options] on your behalf for the functionality you suggest, as this issue requires exploration and possibly a modification to our software. Please make a note of this number for future reference.

 

You are welcome to request an update on the status of this issue or to provide us with additional information at any time quoting this wish list item number.

 

This issue is important to me. What can I do to help?

 

This issue needs to be assessed by our engineering team, and prioritised against all of the other outstanding change requests. Any information that you can provide to influence this assessment will help. Please provide the following where possible:

 

  • Impact on your application and/or your development.
  • The number of users affected.
  • The potential revenue impact to you.
  • The potential revenue impact to Autodesk.
  • Realistic timescale over which a fix would help you.
  • In the case of a request for a new feature or a feature enhancement, please also provide detailed Use cases for the workflows that this change would address.

 

This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact items. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.

 

You may also want to take a look at this related thread discussing 'preview image for a family, set anti-aliasing, set model edges to on':

 

http://forums.autodesk.com/t5/revit-api/create-preview-image-for-a-family-instance/td-p/5491795

 

It ends with a suggestion from Revitalizer to make use of the Windows API and/or UIAutomation functionality to programmatically set the Revit UI thin lines.

 

We published his solution for setting thin lines on The Building Coder:

 

http://thebuildingcoder.typepad.com/blog/2015/03/thin-lines-add-in-using-ui-automation.html

 

That is almost certainly possible, probably quite reliable, and not that hard to do to access to the five Export Image Options toggle buttons that you highlighted in your image as well.

 

I hope this helps.

 

Please let us know how it goes.

 

It would be cool and a pleasure for me to present a solution for this using the Windows API.

 

Thank you!

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 4 of 9
nick
in reply to: jeremytammik

Hi Jermey,

 

Ok a solution to my problem could be to create my own custom view exporter.

Or print the view to a virtual PDF printer but this would be more complicated.

 

I think I will use your SVG image exporter and see if this works.

Link to your blog post about it below.

http://thebuildingcoder.typepad.com/blog/2015/04/sending-a-room-boundary-to-an-svg-node-web-server.h...

 

 

 

Message 5 of 9
jeremytammik
in reply to: nick

Very cool!

 

I love that SVG exporter!

 

🙂



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 6 of 9
nick
in reply to: jeremytammik

Ok I will let you know if i have to modify it.
Is the SVG exporter a separate project on code project?
Message 7 of 9
jeremytammik
in reply to: nick

Message 8 of 9
colin.magner
in reply to: nick

Nick,

 

I don't have an answer to your query, but you've prompted me to find the answer to mine, so thanks!

 

I was looking for a way to export the visible portion of the current window, which I was struggling with, and your screenshots showing that this was under export range solved it for me.

Message 9 of 9
nick
in reply to: colin.magner

Glad my post could help.

The more clear and concise information on the Revit API the better.

 

Warm regards
 
Nick
 
Nicholas Broadbent
Drafting | BIM Consulting | Software 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community