Anuncios
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Add a field in a schedule to show what the family is hosted on.

Anonymous

Add a field in a schedule to show what the family is hosted on.

Anonymous
No aplicable

Hello,


I'm currently creating a luminaire schedule and would like to add a field for the lighting fixture families that shows each instances host. 

 

For example: the below photo shows that the host of this instance of the fixture family is a Reference Plane called "G - 3000 FROM...."

Capture.PNG

 

And this is what I'd like to have on my schedule in blue (pardon the awful penmanship, it Shows a field "Host" with "G-3000..." reference plane as a host):

 

Capture2.PNG

 

If anyone knows how to do this, I'd really appreciate the solution. I looked through the available fields and couldn't find something that works.

 

Thanks.

 

 

0 Me gusta
Responder
Soluciones aceptadas (1)
4.062 Vistas
9 Respuestas
Respuestas (9)

Secttor
Collaborator
Collaborator

Why don't you add your own shared-parameter in the family called "Host" (being text) and the value for it "G - 3000 FROM...." or whatever you with. This will be available as a column in the schedule for your needs.

Revit MEP - Electrical Certified Professional
Revit MEP - Mechanical Certified Professional

Draftworks.wordpress.com
0 Me gusta

Anonymous
No aplicable

By doing this is this family shared parameter going to automatically update based upon what host I place on or do I have to manually input the string value?

0 Me gusta

Secttor
Collaborator
Collaborator

You have to input (not a big challenge)..unless it get this information from code (developers could help). 

Revit MEP - Electrical Certified Professional
Revit MEP - Mechanical Certified Professional

Draftworks.wordpress.com
0 Me gusta

Anonymous
No aplicable

Unfortunately, this does pose a big challenge because I'm working on a project that has hundreds of fixtures. The lighting layouts of the fixtures are still in preliminary design, where the host can be altered quite frequently (to a new level). Some of our designers may forgot to update this information and therefore throw off other designers. There has to be a way where you can create a new shared parameter and link it to the current host of the family. 

Secttor
Collaborator
Collaborator

At this moment I don't see an easier method except code for filling-in that shared-parameter with hosting properties..automatically.

Revit MEP - Electrical Certified Professional
Revit MEP - Mechanical Certified Professional

Draftworks.wordpress.com
0 Me gusta

ToanDN
Consultant
Consultant

@Anonymous wrote:

Unfortunately, this does pose a big challenge because I'm working on a project that has hundreds of fixtures. The lighting layouts of the fixtures are still in preliminary design, where the host can be altered quite frequently (to a new level). Some of our designers may forgot to update this information and therefore throw off other designers. There has to be a way where you can create a new shared parameter and link it to the current host of the family. 


You can create a dynamo script to read the host information and write it to a new parameter.  Below is a quickie:

 

Capture.PNG

Anonymous
No aplicable

@ToanDN I wanted conclude your script as a solution, however, I'm running into issues where some of the light instances are not hosted anywhere and therefore are spewing out a null. Since the Element.Name block does not have a handler for this null, it stops creating the list of Strings (I guess it errors out or something). I am trying to create a null handler in between the  so that it would ignore the nulls and place a string value in the "Host" field of the schedule of "Not hosted". I think I'm close, spent about 2 hours trying to figure out what I could do, and ended up trying to write my own code in the code block. Unfortunately, I'm not used to this syntax and I've been trying to learn how to write a simple for loop to weed out the nulls, here is my sudo code:

 

x[];             //is a list of all the fixtures as the element type

y[];             //is a list of booleans (same size of x[]) stating whether it is a null (true for yes false for no)

output[];    //is a list of strings (same size of x[]) of host names of each instance

 

for(int i = 0; i < listOfFixture.Length; i++)

{

 if(y[i]==true)

  {

    output[i]="No host"

  }

 else{

  output[i]=x[i].Element.Name.toString; //or however you call the Element.Name function.

 }

}

If you know any resources on syntax of dynamo, I'd really appreciate that and or if you know how to write the above, I'd appreciate that as well.

 

Thanks once again for your starting script.

0 Me gusta

ToanDN
Consultant
Consultant
I am a Dynamo noob myself so I would suggest you asking the question in the Dynamo forum, link in my signature. Good luck!
0 Me gusta

Anonymous
No aplicable
Solución aceptada

The solution: after collaboration with @ToanDN, this is what I had created to solve the issue. Image below shows a dynamo script.

 

Capture.png