Revit 2021 Visual Studio Add-in Templates

Our tidbits for today:

Revit 2021 Visual Studio Add-in Templates

Wizard migration – VisualStudioRevitAddinWizard is now available for Revit 2021, thanks to cflux, aka @maltezc, prompted by his initial comment:

Question: Is there an addin wizard for Revit 2021?

Answer: Thank you for your motivating question.

Nope, I have not migrated it yet.

You asking for it significantly raises the chances of it happening soon, though.

Alternatively, of course, you can fork the repo, migrate it, and submit a pull request to share with the rest of the community.

Thank you!

Very kindly, cflux went ahead and did it themselves, submitting pull request #12 – 2021 migration.

I tested and confirmed that it works well for me.

Here is the diff to the previous version.

Many thanks to cflux for this helpful contribution!

Wizard migration

Four Important Design Patterns

Here is a nice article on 4 design patterns you should know for web development: observer, singleton, strategy, and decorator.

In fact, they are just as important and useful in the context of the Revit API as well!

Invisible Shared Parameters don't make it into Forge

By the way, talking about wizards above quickly leads to the topic of magic and the question invisible objects...

In general, all Revit element properties are translated and available in the Forge viewer environment.

However, unfortunately for some, that is not always true.

This question just came up and was confirmed again as follows:

Question: One of my family parameters is missing after translation from RVT to Forge.

Examining this parameter inside the family document in Revit using RevitLookup, I see that the missing parameter has a Visible: false setting in its definition.

Does this mean that the Revit extractor will ignore invisible parameters while exporting the property database?

Answer: Yes indeed, Revit Extractor only handles visible parameters:

  InternalDefinition^ idef
    = dynamic_cast(paramDef);

  if (idef)
  {
    if (!idef->Visible)
    {
      continue;
    }
    ...
  }