Trying to Get GUID for a Shared Parameter Definition


I am passing a parameter definition (that I know is shared) into a node and trying to return the GUID from the parameter (not from External Definition).


I keep getting Null returned. Here is my code for the Get GUID node, can you please help?

import clr

Import RevitAPI

import Autodesk
from Autodesk.Revit.DB import *

Import DocumentManager and TransactionManager

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

Import ToDSType(bool) extension method

import Revit
import System
from System import Guid

doc = DocumentManager.Instance.CurrentDBDocument
app = DocumentManager.Instance.CurrentUIApplication.Application

#The input to this node will be stored in the IN[0] variable.
elementz = IN[0]

parg = []
for i in elementz:

#Assign your output to the OUT variable
OUT = parg


Hi Luke,

It looks to me like a non-shared parameter somehow managed to sneak up in there. There’s a built-in check that you can implement. Try something along the lines of this:


Also the Guid is already in a string format, so I don’t think that you need that .ToString() method in there. If the above doesn’t help, are you getting any error messages in your python node? ( bring it out from the custom node first to see the error messages)


Worked perfectly! Thanks Dimitar.