PDF with some lines in color

Hi,
I wonder if it is possible to use Dynamo to get a certain line type, for example Sealing Layer, in color when printing to PDF?

Unfortunately, I have no experience with Dynamo myself.

//Helena

Hi and welcome,

If you’re unable to do it manually in Revit, Dynamo can’t do it either. Dynamo will use the same PDF exporter/printer you use normally and if we can’t change specific layers like in autocad i doubt it’s possible at all.

Revit prints the way it looks, so this is doable if you set the display before you print.

I am not at the PC to check, and you’ll likely have to write some code (Genius Loci might have some nodes for this though so check there), but some basic steps might look like this:

  1. Line Styles are a subcategory of the Line category, so I would start by getting the subcategory for your given line style. Likely pull the Line category and get the subcategory with a matching name.
  2. Next build the color you want to use. Revit uses different color objects than Dynamo but you can convert from the color palet node for selecting a color to a Revit color by extracting the R, G and B components and creating a color from there.
  3. Next get the subcategory’s current LineColor, which is a simple property that you’ll need to read. This is needed so you can ‘undo’ the update later.
  4. After that set the color to your new color object using the same property (you’ll need to be in a transaction now as you’re recording back to the model).
  5. Next you’ll need to regenerate your views, so commit the transaction and perhaps just to be safe use a regenerate method or update view method.
  6. Print the view to get your highlighted artifact.
  7. Start a second transaction and set the color for the subcategory back to the original color.
1 Like