Renaming Print Settings

Hi, I am trying to rename print settings with Element.SetName but it isn’t working. I assume the node will take lists of matching lengths (I’ve tried it trying to rename one print setting at a time as well and still no joy) Any ideas what I’m doing wrong? thanks Print Settings Rename.dyn (34.1 KB)

Hi @James_Hyde,

You have to use the Rename method.

Hi Alban,

Thank you, do I have to incorporate that into the Element.SetName node or create a new one? - I assume the relevant python script within the node is the one shown below. Also, what is the syntax in Python? sorry, no idea when it comes to programming! Thanks.

I can change the name of the active PrintSetting

import clr
from Autodesk.DesignScript.Geometry import *
import clr
import Autodesk
from Autodesk.Revit.DB import *
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument


printManager = doc.PrintManager
printSetup = printManager.PrintSetup


OUT = printSetup

You can also find some informations here :

Hi Alban, many thanks will take a look through this

When I try to rename Printsetting Types, I have this error above the Python Script :
Exception: You can NOT set the name here, please set the name via PrintSetup::Rename method!

So I can’t go further.

It is written in the API :
“The PrintSetup manages the print settings of current document.
The Print Setup object can only get from PrintManager object.
Print Setup Rename = Rename the current print setting with the specified name.”