Can someone help with this python script

I am in desperate need of help grouping my datasmith objects that are imported from Revit.

all my elements have datasmith user data attached

I’m looking to

  1. find the value in the “Element_wc_TaskCode” parameter
  2. add that value to a new tag
  3. select all actors and filter by the new tag
  4. Join all actors with the new tag

I’m trying to work off the examples shown here

I should be able to remove .by_actor_Label and add .by_actor_tag


Find all Floor* meshes from the current level

actor_list = unreal.EditorLevelLibrary.get_all_level_actors()
actor_list = unreal.EditorFilterLibrary.by_class(actor_list, unreal.StaticMeshActor.static_class())
actor_list = unreal.EditorFilterLibrary.by_actor_label(actor_list, “floor*”, unreal.EditorScriptingStringMatchType.MATCHES_WILDCARD)

Take all the StaticMeshComponent the Actors have and move them all into a new Actor. Same amount of StaticMesh, but less Actors.

join_options = unreal.EditorScriptingJoinStaticMeshActorsOptions()
join_options.new_actor_label = “JoinActors”
join_options.destroy_source_actors = True
new_actor = unreal.EditorLevelLibrary.join_static_mesh_actors(actor_list, join_options);



Copying the information to a tag is really only a workaround to not being able to sort by datasmith data. If this is possible I’d omit the “tag” step.

Somebody Please help!!

I was able to do what I needed in a UtilityBlueprint