Revit API Element Image mirrorelement

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.