Workplane / Face Based Families Offset Parameter

Workplane / Face Based Families Offset Parameter

mastjaso
Advocate Advocate
2,426 Views
6 Replies
Message 1 of 7

Workplane / Face Based Families Offset Parameter

mastjaso
Advocate
Advocate

Hi I'm working on a script to realign some light fixtures with ceilings. The only problem is that some of my families will move, and some won't.

These are both face based families, however, for some reason only one of them has an "Offset" parameter, and this is the only one that will move up or down out of it's reference plane when I call ElementTransformUtils.MoveElement.

2017-12-04 00_22_00-Autodesk Revit 2017.2 - [Section_ Section 5 - 170710 Test Project_detached_centr.png

 

2017-12-04 00_21_50-Autodesk Revit 2017.2 - [Section_ Section 5 - 170710 Test Project_detached_centr.png

 

So why does my Type A fixture have an offset parameter, and why is it the only one that will move?

 

 

 

 

0 Likes
2,427 Views
6 Replies
Replies (6)
Message 2 of 7

Mustafa.Salaheldin
Collaborator
Collaborator

Please clarify more. I can't get your point.


¯\_(ツ)_/¯
Let it work like a charm.

Mustafa Salaheldin


EESignature




Digital Integration Manager, DuPod

Facebook | Twitter | LinkedIn

0 Likes
Message 3 of 7

mastjaso
Advocate
Advocate

Look under their properties, in the "Constraints" parameter group. The Type A fixture has 3 parameters, one of which is "Offset". The Type E fixture only has 2 parameters.

 

If you call ElementTransformUtils.MoveElement and try and move them 2' vertically up or down, the Type A fixture will move (and it's "Offset" parameter changes), whereas the Type E fixture will not move. So I'm trying to figure out why one only one of these families has an "Offset" parameter?

0 Likes
Message 4 of 7

Mustafa.Salaheldin
Collaborator
Collaborator

This is due to the template used to create the family. Some built-in family templates provide the Offset parameter automatically and some of them not.

Please refer to this article for more explanation.

 

If this reply satisfies your needs please mark it as an answer.


¯\_(ツ)_/¯
Let it work like a charm.

Mustafa Salaheldin


EESignature




Digital Integration Manager, DuPod

Facebook | Twitter | LinkedIn

0 Likes
Message 5 of 7

mastjaso
Advocate
Advocate

Thank you for that explanation, but is there any way to change their properties and convert between the two using the API?

0 Likes
Message 6 of 7

mastjaso
Advocate
Advocate

Also, is there any way of telling which way the family was built? As far as I can tell regardless of which template was used the BuiltInParameter.INSTANCE_FREE_HOST_OFFSET_PARAM has value, is not user modifiable, and is not read only so I'm not sure how to tell which way the family was built.

0 Likes
Message 7 of 7

Mustafa.Salaheldin
Collaborator
Collaborator

As far as I know, the answer is you won't be able to modify or add the properties by API to get the out of the box ones. Please share a sample file with sample family to see if I can help.


¯\_(ツ)_/¯
Let it work like a charm.

Mustafa Salaheldin


EESignature




Digital Integration Manager, DuPod

Facebook | Twitter | LinkedIn

0 Likes