Read and write on the Keynote text/description

I want to write the Keynote Text directly in the Family type, not the tag, bypassing the keynote text file. However, I don’t find that parameter in the Family Type parameters list and don’t even know if the keynote text is recorded in the type object, or only on the tag.
Can anyone help?

Keynote API is very limited, but maybe deconstruct your keynote file in dynamo first by splitting at returns and then those split rows at the tabs, then tranpose to 3 sublists (columns).

You can then check the index of a keynote value in column 1 and get the description from the second column of your deconstructed file and write it to the same object’s shared parameter value.

Hi Gavin, thanks for the reply.
I cannot access the Family Type shared parameter. It does not show up in the Parameters list (see attached file). Fill KeynoteDescription.dyn (48.6 KB)

You will need to deal with the family type versus a family instance in that case.

Why don’t you load the database into Dynamo and filter by keynote number to get the right description, then set the description parameter of the model element?

1 Like

Family types only have the Keynote parameter to designate element keynotes. They do not have individual Key Value or Keynote Text parameters to fill out. The description (Keynote Text) is specifically meant to be tied to a Key Value anyway. I don’t think it’s even possible to assign those values (besides a dummy key) without using a Keynote File.

2 Likes

That’s what I feared. Thanks for the help.

I can do that, and write the description into my own parameter on the Family Type, but then Revit will not use that parameter to tag and insert the keynote table on drawings.
I want to write on the keynote text/description of the Family Type directly from a remote database, bypassing the text file. It would work like this

  1. Read the Project name
  2. Read the Keynote in the Family Type parameter: eg: Project: “School101”, Keynote “PR09”
  3. Consult the remote database and fetch the Keynote Text for that Keynote, on that project.
  4. Write the Keynote Text on the Family Type
  5. Keynote tables and Keynote tags are generated (and possibly updated) with that info.

Try to use BIT, it will create classification shared parameters for the desired elements that will hold both the number and the description, and use Generic Annotations families to tag your elements;
I think Keynotes have some restrictions tied directly to the loaded txt file within Revit.
Hope it helps.

Thanks, BIT mens Autodesk revit classification manager?

Yes

It sounds like you’re building a new system that works just like keynotes but without a keynote file. Why not just use the keynote file to do exactly what you’re looking for? You can use Dynamo to write the keynotes you want and then just assign and tag the elements.

1 Like

We want to bypass the file to go straight to our database, but we may end up automating the construction of a file from the database using dynamo or C#.

That seems like the way to go. To me, it sounds like you’re making more work to go around the keynote file than to just automate it.

It seems that way, will let know of the outcome!

What was your outcome? I’d be interested to know what you ended up doing.

Still haven’t developed more into this. Writing Keynote descriptions on the family types seems to be out of reach for now.