Script 2nd run altering results of the 1st run

Try upgrading to the latest Dynamo build 2.0.2 and see if that fixes it.

Roger that!

It solved the speed error! thanks for that. I am getting a new error now.

Warning: Sheet.ByNameNumberTitleBlockAndViews operation failed.
View 0 could not be packed on the Sheet. The sheet is 1.41666666666666 x 0.91666666666667 and the view to be added is 0.407291666666668 x 0.983473154687024.

Did you experienced that?

Nope - maybe the view offset related?

No I think the problem is my python node. Is not feeding the vectors in the correct order as the views are requesting it. Mind sharing yours?

mine is:

import clr 
clr.AddReference('ProtoGeometry') 
from Autodesk.DesignScript.Geometry import *  
# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
# Import DocumentManager and TransactionManager 
clr.AddReference("RevitServices") 
import RevitServices from RevitServices.Persistence 
import DocumentManager from RevitServices.Transactions 
import TransactionManager   from System.Collections.Generic import *  
# Import RevitAPI clr.AddReference("RevitAPI") 
import Autodesk  

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

#The inputs to this node will be stored as a list in the IN variable. 
pcE = IN[0] 
PCtransforms = [] 
PClocations = [] 
r=[] 

if isinstance(pcE,(list,)): 
  for i in pcE: 
    e = UnwrapElement(i) 
    tbX = e.GetTotalTransform().BasisX 
    vecX = Vector.ByCoordinates(tbX.X, tbX.Y, tbX.Z) 
    tbY = e.GetTotalTransform().BasisY 
    vecY = Vector.ByCoordinates(tbY.X, tbY.Y, tbY.Z) 
    tbZ = e.GetTotalTransform().BasisZ 
    vecZ = Vector.ByCoordinates(tbZ.X, tbZ.Y, tbZ.Z) 
    r.append([vecX, vecY, vecZ]) 
else:
  e = UnwrapElement(pcE) 
  tbX = e.GetTotalTransform().BasisX 
  vecX = Vector.ByCoordinates(tbX.X, tbX.Y, tbX.Z)
  tbY = e.GetTotalTransform().BasisY 
  vecY = Vector.ByCoordinates(tbY.X, tbY.Y, tbY.Z) 
  tbZ = e.GetTotalTransform().BasisZ 
  vecZ = Vector.ByCoordinates(tbZ.X, tbZ.Y, tbZ.Z) 
  r.append([vecX, vecY, vecZ]) 

#Assign your output to the OUT variable 

OUT = r

Them I grab each list of vectors with:

a@L2<0>;
a@L2<1>;
a@L2<1>;

respectively on DS code nodes. Where a is the list from the python node.

there is an alternative

Hi Marcel, I was just thinking of that! Thanks for the tip! I will be sure to give it a try!

hi @lucaspfmoreira

try this node:

image

Hi, I will! Thanks, I appreciate the help!