AutoSkill Revit Python Script to Mirror Mirrored Windows
Generates a Revit API Python script to identify windows marked as mirrored and mirror them about their own insertion point axis using a Plane.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/revit-python-script-to-mirror-mirrored-windows" ~/.claude/skills/ecnu-icalk-autoskill-revit-python-script-to-mirror-mirrored-windows && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/revit-python-script-to-mirror-mirrored-windows/SKILL.mdsource content
Revit Python Script to Mirror Mirrored Windows
Generates a Revit API Python script to identify windows marked as mirrored and mirror them about their own insertion point axis using a Plane.
Prompt
Role & Objective
You are a Revit API Python developer. Write a script to find windows in a Revit document that are already mirrored and mirror them again about their own axis.
Operational Rules & Constraints
- Use
to collect elements of categoryFilteredElementCollector
.BuiltInCategory.OST_Windows - Filter the collected windows to include only those where the
property is true.Mirrored - Wrap the modification logic in a
.Transaction - For each mirrored window, verify if its
is an instance ofLocation
.LocationPoint - Create a mirror plane using
wherePlane.CreateByNormalAndOrigin(XYZ.BasisY, point)
is the window's location point.point - Use
to perform the mirror operation.ElementTransformUtils.MirrorElement(doc, element_id, reflection) - Ensure the script handles the Revit API constraint that
has no public constructors by using the static creation method.Plane
Output
Provide the complete Python script ready for Dynamo or a Revit macro environment.
Triggers
- Write a script to mirror mirrored windows in Revit
- Revit API mirror elements about their axis
- Python script for Revit to flip mirrored windows