Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

IF Statement, filled region in door tag

10 ANTWORTEN 10
Antworten
Nachricht 1 von 11
Anonymous
1058 Aufrufe, 10 Antworten

IF Statement, filled region in door tag

Hi,

 

I have approx 3000 doors in our project. I have a Shared-text-parameter called drofus_Entreprisetilhørighet on all doors.

In the proporties palette, that parameter tells us, what contractor the door belongs to. The text paramter will only say K240, K241 or K250.

 

In my door tag I use that parameter, and the tag will show K240, K241 or K250, no problem there.

 

My question is:

 

Is it possible to create a tag, that will create/show a black thick dot every time the door is marked K241 in the text parameter drofus_Entreprisetilhørighet ?

 

I was thinking about creating a filled region in the family and then make a visibility setting on that filled region, and then create an "IF Statement"

e.g. IF drofus_Entreprisetilhørighet = K241, then the dot will show.

 

If anyone can clarify if thats possible or not, and berhaps give me some guidence I would be very happy.

I've tried to use the approach in the video without any luck: https://www.youtube.com/watch?v=hGmAtQjqhFc

 

Please also se the atteched snips

 

Thanks and best regards

 

Kasper

Tags (4)
10 ANTWORTEN 10
Nachricht 2 von 11
Alfredo_Medina
als Antwort auf: Anonymous

You need different types in the same tag family. Use a special type of tag for that type of door. Use the default type of tag for the other types of doors.


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
Nachricht 3 von 11
ToanDN
als Antwort auf: Anonymous

What is your Revit version?
Nachricht 4 von 11
Anonymous
als Antwort auf: Alfredo_Medina

Hi Alfredo,
Thanks for your answer. As I see it, I will then have to manually tag/change tags to the new tag-type on the door that needs the dot - correct? I will then have to tag aprox. 500 doors manually out of the 3000 I have. It could be cool to work around that.

Thanks
Nachricht 5 von 11
Anonymous
als Antwort auf: ToanDN

Hi ToanDN,

We work in 2016

Thanks
Nachricht 6 von 11
Revit_Whisperer
als Antwort auf: Anonymous

An easy way to select all of the doors with the 241 value is to create a filter for Doors and the Contractor does not equal 241.  Add the filter to the view, but make sure it is not checked.....then turn off everything in the view except doors and door tags and swap out the tag on the remaining visible doors with the tag for that type of door.

Nachricht 7 von 11
ToanDN
als Antwort auf: Anonymous

Try this Revit 2016 file.

Alternately, if K is the only letter you will be using then you can forfeit the Contractor Prefix parameter altogether, and add K as a prefix in the Tag label.

 

Capture.PNG

Nachricht 8 von 11
Alfredo_Medina
als Antwort auf: Anonymous


@Anonymous wrote:
Hi Alfredo,
Thanks for your answer. As I see it, I will then have to manually tag/change tags to the new tag-type on the door that needs the dot - correct? I will then have to tag aprox. 500 doors manually out of the 3000 I have. It could be cool to work around that.

Thanks

No, I did not say that you had to tag them manually. If a door is of a certain type, you can:

  • Select one of those doors
  • "Select all instances > in View"
  • Tag All > Only selected objects in view > select the special type of tag.
  • Apply.

Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
Nachricht 9 von 11
Paul_F_Aubin
als Antwort auf: Anonymous

So I have a possible solution for you, but it is a bit complex. If you do this kind of work all the time, then it would be worth it, but if this is a "one off" it may not be. Also, I am using a new feature in 2017 here, so if you don't have 2017, this may not work for you either. OK, here goes. 

 

Create some Shared Parameters: (two are <Family Types> and one is a Yes/No)

 

<Family Types>:Generic Annotations - I called this one "Designation" but you can name whatever you like. This is the one that will be one of your three vales: K240, K241 or K250. 

<Family Types>:Generic Annotations - I called this one "Compare" but you can name it whatever you like. This one will be permanently set to K241. 

Yes/No - I called this one "Toggle" (Again, name whatever you like). 

 

Create some "Empty" Generic Annotation Families

 

Create a new annotation family using the Generic Annotation template. Delete the red note and save it as: K241.

Save it again as: K240

Save once more as: K250

 

All three of these are EMPTY. They have NO geometry in them. 

 

Manually Edit the Shared Parameter File

 

 

This step should be done with caution. Make a backup of your shared parameter file before you begin. Open the file in NotePad. It will look something like this:

 

# This is a Revit shared parameter file.
# Do not edit manually.
*META VERSION MINVERSION
META 2 1
*GROUP ID NAME
GROUP 1 Dimensions
GROUP 2 Data
GROUP 3 Exported Parameters
*PARAM GUID NAME DATATYPE DATACATEGORY GROUP VISIBLE DESCRIPTION USERMODIFIABLE
PARAM 61110ec2-6265-4cad-9e28-2dab8d30dc9c Compare FAMILYTYPE -2000150 2 1 1
PARAM 1e20bff0-a140-4e52-823c-681226dc890e Designation FAMILYTYPE -2000150 2 1 1
PARAM 6a9942fc-406e-443d-8837-2a13420d000b Toggle YESNO 2 1 1

 

 

Locate your Compare parameter and at the end of the line, change the 1 to a 0 (zero). 

 

 

PARAM 61110ec2-6265-4cad-9e28-2dab8d30dc9c Compare FAMILYTYPE -2000150 2 1 0  <----

 

This makes this parameter "read only" and you will not be able to edit its value. This means that when you add this parameter to a family, it will assign the default value to it and you will not be able to change it. So, careful planning is important here. 

 

Close and save the shared parameter file. 

(If you have CTC Express Tools, you can do this step in their Shared Parameter Manager tool and it is a much nicer experience.)

 

Open your Door Family and add parameters

 

This is the step I don't like if you have lots of families. If you have an automation tool such at CTC Family Processor, this can go MUCH quicker for lots of families. Otherwise, you  will have to repeat this process on each door family. 

 

In the first door family, Import the K241 generic annotation ONLY. (We will import the others later). This is VERY important to make sure that the un-modifiable parameter gets assigned the correct value. 

 

Notice that the parameter will be grayed out, but it will be assigned to K241. 

 

Add the other two shared parameters to this family as well. 

 

Add a formula to the Toggle parameter: Designation = Compare.

 

Parameters.png

 

(I made all of these instance, but you can go Type-based if you prefer).

 

Now you can import in the other two generic annotations. 

 

So what this is doing is giving you a drop-down list in the Designation field. This will list the three loaded generic annotation families. Since you named them K240, K241, and K250, you will get a list of those options. Meanwhile the un-modifiable parameter is also showing generic annotations, but its value is fixed on K241. So this way, a user cannot accidentally change it. This is key, because the formula compares the two fields and if they are the same, it checks the box and if they are different the box is unchecked. 

 

So now we have a checkbox that will drive the "Dot" in the tag. 

 

Unfortunately, you now need to repeat this process in each door family. (Again, CTC Express tools would be a BIG help here). 

 

Edit the Door Tag

 

Open your door tag next and add a new label. 

 

In the label parameters, use the icon at the bottom to add a new shared parameter to the list. Add ONLY the Toggle parameter (The Yes/No). DO NOT add this Toggle parameter directly to the label. Instead, we will do a calculated value. Calculated values are new in 2017. 

 

Click the Calculated value icon in the middle and give it a name. 

Input the following formula: 

if(Toggle, "n", " ")

 

So you are probably wondering why "n". Well, instead of using a filled region and trying to get it to turn on and off, use a font! In the Webdings font (installed in most Windows systems), the letter "n" (lowercase) is a solid filled black dot!

 

Tag.png

 

Close the dialog, save the tag family and load it and your modified door families into your project to try it out. 

 

Test it out

 

In your project, select any door and you should have a drop-down list on the properties palette of any door you select. You can choose one of the three designations there. If you choose K241, the black dot will appear on the tag. 

 

Tag the doors to test it out.

 

Doors.png

 

 

Whew. That is a lot of steps. And as I said, might be overkill for some projects. But since you said you have 3000 doors, I figured it might be worth a shot. 

 

I attached a sample file. 

 

Hope that helps. 

 

 

 

Paul F Aubin
Author/Consultant

EESignature

Check out my books and training videos
paulaubin.com

Nachricht 10 von 11
Anonymous
als Antwort auf: Paul_F_Aubin

Alfredo thanks for your answer. Yes I will only be able to do that through a schedule (select all K241 doors and then highlight in model), since all types can belong to one of the three options: K240, K241, K50.

ToanDN, Thanks for your answer. I have tried your solution and it works fine. My problem is that my before mentioned parameter is a text parameter. I do not have the option the change the parameter to a “number parameter” as you use.

Paul, thanks for your very precise answer. I’ve read it and think it looks very promising. I will get my hands on a 2017 license from our HQ next week, where I will try your guide/suggestion. I will get back on that one.

Thanks a lot for your time and answers.
Nachricht 11 von 11
Alfredo_Medina
als Antwort auf: Anonymous


@Anonymous wrote:
Alfredo thanks for your answer. Yes I will only be able to do that through a schedule (select all K241 doors and then highlight in model), since all types can belong to one of the three options: K240, K241, K50.

...

Yes, it is possible to select from the schedule, if you filter the schedule first, by that value. The other alternative is to use a view filter that applies to doors, based on the value of this parameter, so that you can isolate only those 3000 doors whose value is K240, and then select those doors, and then use Tag All > Only selected objects in current view.


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report