Some Terms face, plane, and UV are involved here. They have not been clarified yet and are recorded for the time being. [Transaction (transactionmode. Manual)]
[Regeneration (regenerationoption. Manual)]
Public Class Firewall firewall wall: iexternalcommand
{
Public Result execute (externalcommanddata upload data, Ref String MSG, elementset elements)
{
Uidocument uidoc = Using data. application. activeuidocument;
Transaction TS= NewTransaction (uidoc. Document,"Http://revit.5d6d.com");
TS. Start ();
Reference=Uidoc. selection. pickobject (objecttype. element,"Select a wall");
Wall=Uidoc. Document. getelement (reference)AsWall;
Firewall wall (uidoc. Document, wall );
TS. Commit ();
Return Result. succeeded;
}
Private Void Firewall wall (document DOC, wall)
{
Reference = Hostobjectutils. getsidefaces (wall, shelllayertype. Exterior). First ();
Face = Wall. getgeometryobjectfromreference (reference) As Face;
UV bboxmin = Face. getboundingbox (). min;
Plane plane = New Plane (face. computenormal (bboxmin), face. Evaluate (bboxmin). Add ( New XYZ ( 10 , 10 , 0 )));
Elementtransformutils. mirrorelement (Doc, Wall. ID, plane );
}
}
From: http://revit.5d6d.com/thread-1274-1-1.html