Element.GetParameterValueByName warning
We get the following warning (see fig. 1).
Presumambly it is the “null” values?
Fig. 1
Does anyone have a solution for this?
Thanks in advance.
Element.GetParameterValueByName warning
We get the following warning (see fig. 1).
Presumambly it is the “null” values?
Does anyone have a solution for this?
Thanks in advance.
Very likely.
Eliminate the nulls by introducing List.Clean (with false for preserve indices) after All Elements of Type
This fixes the above warning, but I get several warnings later in the script (didn’ have this before ; see fig. 1).
New warnings see fig. 1 and fig. 2.
In fig. 3 you see the previous error. Here you can also see that in the node "code block - viewlist (1) viewlist; " get different data as afther adding the “List.Clean”.
Do you have a solution for this?
Thanks in advance.
Source data:
RVT2021.1.1_JBO_Create-sheets-for-existing-views.dyn (312.4 KB)
You would have to filter the cleaned list, not the original one. Otherwise you’re not only ignoring the nulls, you’re also throwing off your list order.
I don’t quite understand what you mean.
If I do the filtering afterwards, I still have the warning?
Hello @j.boonen
try this method with Python (Green frame on the picture)
import clr
import sys
import System
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#import Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
#import transactionManager and DocumentManager (RevitServices is specific to Dynamo)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
fecView = FilteredElementCollector(doc).OfClass(View).WhereElementIsNotElementType().ToElements()
OUT = [x for x in fecView if not x.IsTemplate and x.CropBoxActive]
Thanks for the reply. Is this an alternative for the solution of @Vikram_Subbaiah ?
However, I’m not yet fully involved in your figure. Which node do I need to connect to the Python script / which nodes can I remove?
Thanks in advance!
Hello @j.boonen
yes it’s an alternative solution