Translated quote:
Please download the macro down here: Download DeleteStandardMaterials

  1. Connect Revit.
  2. Unzip the zip file. The ZIP contains a DeleteStandardMaterials folder with two subfolders (AddIn + Source).
  3. Copy the addin + Source folder on the following path: C: \ Program Data \ Autodesk \ Revit \ Macros \ 2015 \ Revit \ AppHookup \ DeleteStandardMaterials
  4. Start Revit.
  5. Open the file.
  6. Open Manage / Macro Manager / Application tab: The macroDeleteStandardMaterials” appears under the Application tab.
  7. Select “Execute” and start the “Run” command. > The standard materials are removed.

via
http://translate.google.com/translate?u=http%3A%2F%2Fbimblog.typepad.com%2Fautodesk_bim_blog%2F2014%2F08%2Fdatei-performance-issue-in-revit-2015.html&hl=en&langpair=auto|en&tbb=1&ie=UTF-8

unusedmats.png

The next generation of successful designers will have one important thing in common – the ability to quickly build the tool they need to accomplish a given task. Revit macro coding is one way to do this (Dynamo is another, even powerful Excel spreadsheets can qualify as BIM tools). But if you have had limited involvement with Revit macros in the past, you might be wondering “So… What is a macro anyway?”

One good place to start would in this great little article by Troy Gates on AUGI. Here are three tips from the article to get you interested:

  • I highly suggest creating the macros in the application tab so you can reuse the macros in any Revit model. If you store the macro inside the model, then it is only available to that Revit model.
  • The Revit API also allows the use of Microsoft LINQ (Language Integrated Query) functions. LINQ allows you to use a database-like query system to filter the elements contained in a collection. It is much more powerful and easier to use, in my opinion, when working with collections of Revit elements.
  • your code needs to define objects that the Revit API will use to interface with these. These objects are called UIDocument and Document…

Read the whole article:
Introduction to Revit Macros | AUGI

The problem – Appending a given NWC creates hundreds of lights in your NWF, as they were exported with light sources from Revit:


Update: scroll to the bottom of the Autodesk Rendering, Lights pane and select the last entry. Press and hold the Delete key on the keyboard – it will rapidly delete lights out of the Navisworks model.

One way to get rid of all these light sources is to use a macro recorder to delete them all. This is because Navisworks 2015 does not allow you to delete multiple light sources at once (sadface), and it doesn’t allow you to “Clear Palette” like Presenter did.

The immediate workaround is to use Shaded mode with Headlight only, as this ignores Light sources. Not pretty.

You could also down-save to 2013, delete the lights in Presenter, then save-up to 2015, but that seems a little too hacky, even for me.

Here’s the clicky mouse macro method:

  1.  Install MouseController (I used choco install mousecontroller)
  2. Open the problem NWF
  3. When it “Can’t resolve external references” for each .ies file, just click Ignore All
  4. Set up a macro to delete lights (see the Screencast below)
  5. My best result was using Time Stretch 3.0x and Repeat every 0.8 seconds
  6. Set it and walk away from your PC for a bit

Some other things to try:

  1. Look for a light source subcategory in your NWC export view
  2. Turn it off
  3. Re-export
  4. Append to a brand new NWF and see if the lights show up in Autodesk Rendering

Another thing to try:

  1. Navisworks Exporter settings/File Reader/Revit
  2. Untick “try and find missing materials”. Make sure that box is NOT checked.
  3. Also turn off light source as in step 1 above.
  4. Re-export
  5. Append to a brand new NWF and see if the lights show up in Autodesk Rendering

Some of the bugs that might show up:

Missing IES file references

Regenerating thumbnail image …

The only real fix (at this stage) is to open each Lighting Family and untick Light Source. Obviously, this is not really an option if you are doing lighting analysis or using the lights for rendering in Revit or 3dsMax etc:

Related forum links:
http://forums.augi.com/archive/index.php/t-98820.html

http://forums.augi.com/showthread.php?133133-Revit-light-fixture-light-source-geometry-won-t-go-away/page2

Visible Light Source – Autodesk Community

Paolo has posted an interesting bit of code that basically allows you to pick a floor element, and it will add points to a topography so that the topo follows the “points” on the Floor.

A very interesting solution to a common problem, namely, the (currently) limited functionality of topo tools in vanilla Revit.

Download here
“Anyway here you can find the code I’ve used
via original post http://puntorevit.blogspot.com/2014/08/align-topo-macro-attempt.html

Interestingly, this hotfix comes in the form of a macro to clean up your files. The issue as stated on the Autodesk Knowledge Network is:
In Revit 2015 the performance of some file is very slow. This means that
opening material browser may take an extremely long time or Revit will
hang. Typically you cannot execute the “Purge unused elements” command
as well, because Revit will freeze. 


Every time you edit a family and load it back in > overwrite > the
number of materials will grow substantially. For example after 5 or so
subsequent reloads in our sample file it jumps from 15551 to 186623
materials.

We have seen this most commonly when editing titleblock familes in the German and Japanese version of Revit. 


Download the macro:
DeleteStandardMaterials.zip

Please go through the process below to clear out the extra materials:

  1. Close Revit.
  2. Extract the zip file: It will contain a DeleteStandardMaterials folder with two subfolders (AddIn + Source).
  3. Copy the AddIn + Source folders on the following path:
    C:ProgramDataAutodeskRevitMacros2015RevitAppHookupDeleteStandardMaterials
  4. Start Revit.
  5. Open the file.
  6. Open Manage/ Macro Manager/ Application Tab: The macro should
    show up in the Macro manager under application > macros as
    “DeleteStandardMaterials”.
  7. Select here “Execute” and start the command “Run” > This will delete Standard Materials.

After these steps use Save As to save the file with a new name.

Here are 2 videos showing the steps:
https://screencast.autodesk.com/Main/Details/5bfa2fff-3443-45e0-a156-4c530c594c28
https://screencast.autodesk.com/Main/Details/fb7eaa0a-b529-47b7-9e35-7d42c3944a0b

Main page:
File performance problem in Revit 2015 | Search | Autodesk Knowledge Network

Heads-up:
Be Revit – Do Family Planning: Revit streikt / Datei wird immer größer und reagiert nicht mehr?

One of the most popular addins for Revit to date is the simple section box tool by Coins. But what about doing the same thing in 2D? Paolo has put together a macro (and shared the code) that crops a Plan view around a selection of elements. Nice job!

From Punto Revit:

I’ve been asked by a  reader if it is possible via Revit API to crop a plan view around a selection of objects, if there are no scope boxes associated it can be done in a fairly easy way.

You can find the code here

Original post:
http://puntorevit.blogspot.com/2014/07/crop-view-by-selection-macro.html

Have you ever experienced the “Missing Third Party Updater” message?  It comes about when an Updater (addin or macro) is in use, and then does not exist on a PC that is new to the project.

From sasha.varsanofieva
You must close all local files, open and click do not warn on your central, and then recreate locals. Otherwise the locals will continue to write the tag back into your central and from your central into the locals.

In my case, this wasn’t enough to fix the issue.  The updater message still showed.  I did this:
  1. Opened the Central with Audit and Detach ticked
  2. Clicked the “Do Not Warn…” option
  3. Saved the file as a Central with a different filename
  4. Closed the file and opened it in the usual method (with Save New Local ticked)
  5. The warning did not show anymore

I don’t think the API programmers should get scared just yet, but is there a day coming when visual programming will completely replace custom code?  Julien seems to think so:

“I firmly believe Dynamo could be used for many many purposes, and addin-like behavior is one…
Definitions are easy to share and update. Users can tune them with only some basic Dynamo skill. It is not the same with addins. It is a lot of work to manage and deploy. And users will not be able to tune things. Same thing for macros.”

Read more:
API or not API: addins vs Dynamo in Revit | AEC, you and me.

Heads-up: https://twitter.com/Jbenoit44/status/414322858823659520

I recently posted about converting Topography to massing forms using a somewhat “manual”, yet lofted and smooth, method:
Convert Revit Topography into Massing Forms

Harry provides some code to do a similar thing with triangulated flat faces over here:
Read the whole post with macro code

Heads-up via: