Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
i'm working on a python script to split a multilayer wall in several monolayer walls (a wall by layer). After creating them, i want to join them, so the hosted elements, like windows, will cut the different monolayer walls.
For exemple, i got a 3-layers-wall, and after my script i got three 1-layer-walls, in a list called Walls. And i'm doing this :
TransactionManager.Instance.EnsureInTransaction(doc)
for wall1 in Walls :
for wall2 in Walls :
try :
JoinGeometryUtils.JoinGeometry(doc, wall1, wall2)
except :
pass
TransactionManager.Instance.TransactionTaskDone()
This code, return an Exception : The elements cannot be joined. Parameter name: secondElement
But, if i run my python script, create my walls, and then select the 3 walls with the dynamo node "Select Model Elements" and run an other script, it works...
doc = DocumentManager.Instance.CurrentDBDocument
Walls = UnwrapElement(IN[0])
TransactionManager.Instance.EnsureInTransaction(doc)
for wall1 in Walls :
for wall2 in Walls :
try :
JoinGeometryUtils.JoinGeometry(doc, wall1, wall2)
except :
pass
TransactionManager.Instance.TransactionTaskDone()
Any idea why it's not working in the first script but i does in the second one?
Solved! Go to Solution.