Lighting Fixtures in opposite direction

Lighting Fixtures in opposite direction

MiguelGT17
Advocate Advocate
688 Views
4 Replies
Message 1 of 5

Lighting Fixtures in opposite direction

MiguelGT17
Advocate
Advocate

Greetings to everyone,

I wish to place lighting fixtures at the top of mirrors. So far, I've achieved to placed them in the opposite direction

 

Manually workflow

MiguelGT17_0-1666233571026.png

 

C# macro:

MiguelGT17_1-1666233605331.png

...
XYZ mirrorLoc = new XYZ(centroidMirror.X,centroidMirror.Y,bb.Max.Z)
FamilyInstance famIns = doc.Create.NewFamilyInstance(mirrorLoc,vanityLight, wallMirror, firstLevel,StructuralType.NonStructural);

 

 

What would it be the best approach for this matter, look into the rotation parameters, mirror, etc. Which one do you suggest?

 

All the best,

Miguel G.

 

 

0 Likes
689 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

Rotate them into the correct position and orientation manually in the user interface.

  

Compare their element properties and relationships before and afterwards using RevitLookup and other database exploration tools:

  

https://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-onto...

  

That can give you a hint of what properties to modify to achieve the desired orientation programmatically.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

sragan
Collaborator
Collaborator

Also, are they just rotated wrong, or are they actually on the wrong side of the wall?

 

0 Likes
Message 4 of 5

MiguelGT17
Advocate
Advocate

I see the hand orientation and facing orientation having a negative value although those are only read parameters and when using fliphand(),flipOrientation(), rotate() it retrieves a false bool operation.

0 Likes
Message 5 of 5

MiguelGT17
Advocate
Advocate

Regarding the first point, I'm using rotate() command but it can not be rotated neither the fliphand() or fliporientation() works

MiguelGT17_0-1666289562607.pngMiguelGT17_1-1666289586256.png

 

 

For the second scenario, how is it that I can set the right side of the wall?

0 Likes