Excution error

Excution error

atk_vinay.krishna
Enthusiast Enthusiast
635 Views
4 Replies
Message 1 of 5

Excution error

atk_vinay.krishna
Enthusiast
Enthusiast

Dear all,

 

i have find some codes to join the floor and walls through revit api.For the same i am attched link from boostyourbim.

https://boostyourbim.wordpress.com/2015/07/24/rtcna-wish-3-granted-join-all-walls-and-floors/

code excuting succusfully at first time  but it is showing error at second time of excution at same model,what is the solutions to avoid the error how to implement the code.

 

Please kindly go through the attached screen shot.

 

Regards

Vinay

0 Likes
Accepted solutions (1)
636 Views
4 Replies
Replies (4)
Message 2 of 5

augusto.goncalves
Alumni
Alumni
Accepted solution
If you're using JoinGeometryUtils.JoinGeometry you can check if the elements are already joined with JoinGeometryUtils.AreElementsJoined method.
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 3 of 5

atk_vinay.krishna
Enthusiast
Enthusiast

Hi,

 

If you dont mind can you give me the sample exmple for JoinGeometryUtils.AreElementsJoined.

 

Regards

Vinay

0 Likes
Message 4 of 5

arnostlobel
Alumni
Alumni

vinay:

 

the code you asked for is so trivial that I almost woder whether it is what you meant to ask:

 

if (false == JoinGeometryUtils.AreElementsJoined(doc, elem1, elem2))
{
   JoinGeometryUtils.JoinGeometry(doc, elem1, elem2);
}
Arnošt Löbel
0 Likes
Message 5 of 5

Mohamed.ShafeerAhamed
Participant
Participant

thank for your reply.

0 Likes