Message 1 of 3
AddGridLine exception
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
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???