AddGridLine exception

AddGridLine exception

rossemir11
Enthusiast Enthusiast
468 Views
2 Replies
Message 1 of 3

AddGridLine exception

rossemir11
Enthusiast
Enthusiast

Hello, everyone!

 

I'm trying to create Grid Lines from windows in new instance of Curtain Wall and i have very strange error. Here is my code:

 

dataEnteringNode = IN

doc = DocumentManager.Instance.CurrentDBDocument
TransactionManager.Instance.EnsureInTransaction(doc)

windowsElevPoints = IN[0]
windowsVerticalPoints = IN[1]
curtain = UnwrapElement(IN[2])

cg = curtain.CurtainGrid

for winPoint in windowsElevPoints:
        xyz = XYZ(winPoint.X*0.00328, winPoint.Y*0.00328, winPoint.Z*0.00328)
        cg.AddGridLine(True, xyz, False)

for winPoint in windowsVerticalPoints:
        xyz = XYZ(winPoint.X*0.00328, winPoint.Y*0.00328, winPoint.Z*0.00328)
        cg.AddGridLine(False, xyz, True)

TransactionManager.Instance.TransactionTaskDone()
 
When I run the script i have error:
 
Предупреждение:IronPythonEvaluator.EvaluateIronPythonScript операция не выполнена.
Traceback (most recent call last):
File "<string>", line 45, in <module>
Exception
 
line 45 is :
cg.AddGridLine(True, xyz, False)
 
So, then I've revealed that if I delete UnwrapElement function, run the script (it will be error curtain don't have AddGridLine method) and after that place UnwrapElement again - script run correctly!!
 
What kind of strange Dynamo and API magic is it??? 
0 Likes
469 Views
2 Replies
Replies (2)
Message 2 of 3

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @rossemir11 ,

 

There is a separate forum for dynamo related questions.

 

The people there are much better equipped to answer your dynamo question than us.

https://forum.dynamobim.com/ 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 3

rossemir11
Enthusiast
Enthusiast

So, I finally figured out, that script was ok. For some unclear reasons, AddGridLine method don't work with curtain walls, created in current transaction.