Questions and answers about the Revit API language environment, development tools, best practices, and other common issues.
What versions of Visual Studio do I need for Revit API development? Can I use Visual C# Express?
What languages are supported for Revit API development?
Is there a wizard to help generate Revit Addins?
Why doesn't my C++ addin build?
Why doesn't my external command show up?
Why isn't my application's OnStartup method called when Revit starts?
How do I reference an element in Revit?
Can a model only use one shared parameter file?
Shared parameter files are used to hold bits of information about the parameter. The most important piece of information is the GUID (Globally Unique Identifier) that is used to insure the uniqueness of a parameter in a single file and across multiple models.
Revit can work with multiple shared parameter files but you can only read parameters from one file at a time. It is then up to you to choose the same shared parameter file for all models or a different one for each model.
In addition, your API application should avoid interfering with the user's parameter file. Ship your application with its own parameter file containing your parameters. To load the parameter(s) into a Revit file:
Do I need to distribute the shared parameters file with the model so other programs can use the shared parameters?
Are shared parameter values copied when the corresponding element is copied?
Are element Unique IDs (UID) universally unique and can they ever change?
Revit takes a long time to update when my application sends data back to the model. What do I need to do to speed it up?
What do I do if I want to add shared parameters to elements that do not have the ability to have shared parameters bound to them? For example, Grids or Materials.
How do I access the saved models and content BMP?
The Preview.dll is a shell plug-in which is an object that implements the IExtractImage interface. IExtractImage is an interface used by the Windows Shell Folders to extract the images for a known file type.
For more information, review the information at Revit API Developers Guide.
CRevitPreviewExtractor implements standard API functions:
STDMETHOD(GetLocation)(LPWSTR pszPathBuffer,
DWORD cchMax,
DWORD *pdwPriority,
const SIZE *prgSize,
DWORD dwRecClrDepth,
DWORD *pdwFlags);
STDMETHOD(Extract)(HBITMAP*);
It registers itself in the registry.
Why is Element.Parameters taking so long to access?
Sometimes the default end releases of structural elements render the model unstable. How can I deal with this situation?
I am rotating the beam orientation so they are rotated in the weak direction. For example, the I of a W14X30 is rotated to look like an H by a 90 degree rotation. How is that rotation angle accessed in the API? Because the location is a LocationCurve not a LocationPoint I do not have access to the Rotation value so what is it I need to check? I have a FamilyInstance element to check so what do I do with it?
How do I add new concrete beam and column sizes to a model?
How do I view the true deck layer?
How do I tell when I have a beam with a cantilever?
|
There are two parameters called Moment Connection Start and Moment Connection End. If the value set for these two is not None then you should look and see if there is a beam that is co-linear and also has the value set to something other than None. Also ask the user to make sure to select Cantilever Moment option rather than Moment Frame option. |
Trace the connectivity back beyond the element approximately one or two elements.
Look at element release conditions.
When exporting a model containing groups to an external program, the user receives the following error at the end of the export: "Changes to group "Group 1" are allowed only in group edit mode. Use the Edit Group command to make the change to all instances of the group. You may use the "Ungroup" option to proceed with this change by ungrouping the changed group instances."
Is the API binary compatible between major releases?