Get Joined elements acting wrong. #244
Unanswered
claudiubrb
asked this question in
Q&A
Replies: 2 comments 1 reply
-
import cadwork
import element_controller as ec
import attribute_controller as ac
import visualization_controller as vc
from collections import defaultdict
elements = ec.get_active_identifiable_element_ids()
visited_elements = set()
attributes_dict = defaultdict(list)
for element in elements:
if element in visited_elements:
continue
joined_elements = ec.get_joined_elements(element)
attributes_dict[element] = list()
for joined_element in joined_elements:
if joined_element in visited_elements:
continue
attributes_dict[element].extend(joined_elements)
[vc.set_color(elements, index) for index, elements in enumerate(attributes_dict.values())]
[ac.set_group(elements, str(index)) for index, elements in enumerate(attributes_dict.values())]if you still face that issue, please attach a 3d example file. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@claudiubrb this will be fixed from build >255 in version 2025 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
I must be doing something wrong. The script below should do the following :
The issue I'm having is that when I have multiple groups some elements get missed. And it's not even consistent , it one case when I should have 25 groups I'm missing a beam element from a group , while If I have 2-3 groups containing the same beam I'm missing a drilling from that group.
import element_controller as ec
import attribute_controller as ac
import utility_controller as uc
Retrieve all visible elements
elements = ec.get_visible_identifiable_element_ids()
if not elements:
uc.print_error("No elements found")
exit()
Dictionary to track assigned numbers
group_mapping = {}
group_counter = 1
Set to track processed elements
processed_elements = set()
Iterate through elements
for element in elements:
if element in processed_elements:
continue
uc.print_error("Joined elements have been grouped and assigned numbers")
can someone please assist.
Beta Was this translation helpful? Give feedback.
All reactions