Repository navigation
Trouble with uc.disable_auto_display_refresh() #170
|
Hi, I encounter trouble with the uc.disable_auto_display_refresh() function on several occasions. After creating for example beams with disabled auto display and deleting them, there are points from those elements that can't be clicked or removed. To remove them, one needs to restart Cadwork. Is this a known issue? |
Answered by
Brunner246
Apr 10, 2024
Replies: 2 comments 2 replies
|
@roehligas |
2 replies
|
If u make use of the uc.disable_auto_display_refresh()
element_map_by_type = defaultdict(list)
move_distance_in_x_direction = 0.0
for i in range(100):
beam_element_id = ec.create_square_beam_vectors(200, 1500, cadwork.point_3d(move_distance_in_x_direction, 0, 0),
cadwork.point_3d(0, 0, 1),
cadwork.point_3d(0, 1, 0))
panel_element_id = ec.create_rectangular_panel_vectors(200, 15, 1500, cadwork.point_3d(move_distance_in_x_direction, -107.5, 0),
cadwork.point_3d(0, 0, 1),
cadwork.point_3d(0, 1, 0))
element_map_by_type['beam'].append(beam_element_id)
element_map_by_type['panel'].append(panel_element_id)
print(f"Created beam element with id: {beam_element_id}")
print(f"Created panel element with id: {panel_element_id}")
move_distance_in_x_direction += 250.0
ec.move_element(element_map_by_type['beam'], cadwork.point_3d(1200.0, 0, 300))
uc.enable_auto_display_refresh()
# Comment out this line to regenerate the elements
# ec.recreate_elements(element_map_by_type['beam'] + element_map_by_type['panel'])I you make use of the |
0 replies
Answer selected by
roehligas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


If u make use of the
...auto_display_refresh, you are responsible for element regeneration.