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: 

Control DWF export color

4 REPLIES 4
Reply
Message 1 of 5
FamhairCloiche
1672 Views, 4 Replies

Control DWF export color

I've written an external application (Xapp) to display the printable sheets in the document for user selection after which they specify an end folder.  I'm at AU so I'll be able to post the code later.  I pulled out the pertinent pieces from the SDK sample, and wired it into a form to fit our needs with a significant amount of post processing to deal with the arcane file naming system that our client is asking for.

 

What I've found is that the API method, ExportDWF(), creates documents that are in color to match the colors from the document rather than in black and white like when you use the native command; the black and white that we need.  I spoke with both Saikat and Jeremy Tammik about the issue so it's on their radars.  JT mentioned adding a process through the DWF API that I will look into next week.

 

In the meantime, has anybody else here already climbed this mountain?

Tags (2)
4 REPLIES 4
Message 2 of 5

Dear FamhairCloiche,

 

what about duplicating your views and overriding the colors in those copied views ?

If you export your copies instead of the original views, this may be a way to gain more control over the exporting process...

Haven't tested this yet, but just an idea.

 

Best regards,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 3 of 5

I'll give that a shot today though I'm afraid that might be a lot more work actually unless there's a one-stop-shop to switch to monochrome that I don't know about.  Once upon a time all of our AutoCAD lineweights were color controlled, and when we first started the transition to REVIT several years ago the "executive paradigm" was less than informed about the differences between CAD and REVIT.  As a result our libraries are shot through with meaningless color for no better reason than that our new UI looks like our old UI.  Some of the color is embedded several layers down in the families, and in other places it's controlled through the project Line Styles as well as the Visibility Graphics.  We've begun to have some success reigning this in, but it's going to be a long road.

 

Just to clarify, the class that's giving me trouble is the DWFExportOptions.  I need a member property that controls the output color format.

Message 4 of 5

Found the fix with much help from Saikat!  The API Export to dwf method does not expose the property that defines that output as Color, Greyscale, or Blacklines.  Setting this property with the PrintManager class doesn't work for this method either.  What it does do however is read whatever the saved "Default" properties are under the:

 

R--->Export--->DWF/DWFx--->DWF Properties--->Print Setup.

 

Set and save the output criteria here and the API export will behave accordingly!

Tags (2)
Message 5 of 5
saikat
in reply to: FamhairCloiche

Glad to know that you found the interim workaround useful.

 

Good luck!



Saikat Bhattacharya
Senior Manager - Technology Consulting

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