A couple of cases dealing with issues concerning small dimensions in Revit were recently raised by Toste Wallmark of Tecton Limited and Henrik Bengtsson of Lindab:
- Minimal length required when calling NewLineBound.
- Minimal possible family component dimension.
- Minimum scaling factor for annotation family symbol.
Minimal Length in NewLineBound
Question: I have discovered that NewLineBound throws System.ArgumentException "Value does not fall within the expected range" when the values are close or very close. Is that an expected behaviour in this case? How close can the line endpoints be for NewLineBound?
Answer: I wrote an external command with the following implementation of its Execute method and was able to verify your assertion with it:
double length = 1; // foot try { Application app = commandData.Application; XYZ p = new XYZ(); XYZ q = new XYZ(); Line line; while( 0 < length ) { length = 0.5 * length; p.X = q.X = q.Y = length; Debug.Print( "Creating model line of length {0}...", length ); line = app.Create.NewLineBound( p, q ); } return CmdResult.Succeeded; } catch( Exception e ) { Debug.Print( "Creating model line of length {0} " + "threw exception '{1}'", length, e.Message ); message = e.Message; return CmdResult.Failed; }
This is the result of running this command in a new Revit model:
Creating model line of length 0.5... Creating model line of length 0.25... Creating model line of length 0.125... Creating model line of length 0.0625... Creating model line of length 0.03125... Creating model line of length 0.015625... Creating model line of length 0.0078125... Creating model line of length 0.00390625... Creating model line of length 0.001953125... A first chance exception of type 'System.ArgumentException' occurred in RevitAPI.dll Creating model line of length 0.001953125 threw exception 'Value does not fall within the expected range.'
So apparently, you should not try to create any model lines with a length below about 0.004 feet, i.e. ca. 0.05 inches or 1.2 millimetres.
This makes pretty good sense to me in the context of an architectural model.
Minimal Family Component Dimension
Question: When building families, the smallest parametric dimension that can be created is about 0.7 mm. Why? This is causing a great deal of problems for us. We are designing profiles whose thicknesses range from 0.4 mm to 3.0 mm. Is there any workaround to lower the minimal allowable dimension limit?
To be exact, our thin metal profiles are produced in different thicknesses. The range is between 0.4 mm and 3.0 mm. When I am designing my product, I want the geometries to be exactly as the physical product.
In the same way, if someone is designing a hot rolled beam like an IPE270, it would really have been a problem if it was created 200 mm high or 300 mm instead of 270 mm. This is the same type of issue. The difference is big for us if you talk about 0.4 mm to 0.5 mm compared to 270 and 300.
With the current limitations in Revit, when I am designing our profile which is 0.7 mm, I have to artificially make it 0.8 mm instead. I will need to create a dummy parameter for the real thickness which is simple text, and then an extra parameter that controls the thickness of the profile. These cannot be the same and that slows me down, as well as having the problem that the profiles are designed with an inaccurate thickness. People will get confused.
Some things in the building process are quite thin and small and that has nothing to do with tolerances really. The tolerances are much smaller than this, but there is no need to express that. There is a very big difference between a profile that is 0.5 mm and 0.7 mm. The load bearing capacity will be twice as big and that is important if someone analyses the drawing in detail. Users will wonder why it is 0.8 instead of 0.7, especially since 0.8 mm might be available from some producers.
Answer: Revit in general is not intended to work with very thin elements of ca. 1 mm. We may have something like that to support surfaces for massing functionality, but it is not possible throughout the product.
The reason is that Revit is tuned up to address building scale modelling. Small details are incompatible with such scale, primary because they interfere with tolerances and it requires much more memory to combine in the same model very small and very large geometrical entities, with side effect of increased processing times.
One approach to such cases is to model the external shape of the object, such as a column, and use interior layers for thin materials.
Currently no such concept is applied to column, but only to wall, ceiling, floor, and roof, unless a column is joined geometry with a wall, in which case the column takes on the layer structure of the wall.
Meanwhile, detail components could be added to such columns in views in which they are cut. Certainly this can be done through the user interface, not sure if it is possible via the API as well.
Minimum Annotation Family Symbol Scaling Factor
Question: Annotation families cannot scale down in size when placed in views with 1:100 or smaller-sized items, e.g. 1:200, 1:500, etc. After setting a parameter of the annotation family which makes it too small, Revit says 'Can't make type xxx", with error in Generic Annotation.
The error seems to happen when the line is shorter than 1 mm.
Is there any way to use the API to circumvent this, e.g. to scale down the annotation to an even smaller size in the view?
Answer: Unfortunately, there is no known way to achieve this. Revit is not designed to function with elements of that size.
Thanks for the explanation Jeremy... Now Autodesk has some interesting and important additions for their next Revit release... I am looking forward already ;-)
/Henrik
Posted by: Henrik Bengtsson | July 16, 2009 at 02:09
Dear Henrik,
Thank you for the appreciation. I do not think that the development team have been convinced yet that anything needs changing, though.
Cheers, Jeremy.
Posted by: Jeremy Tammik | July 16, 2009 at 02:29
I do hope they come up with some way to achieve smaller objects. It's especially frustrating when working with annotation objects which get scaled automatically. Try to have some kind of detail when working on a scale of 1/200!! It's impossible.
Posted by: Wim Tas | July 16, 2009 at 03:25
Sorry to comment so long after the fact, but you came up on a Google search so...
What do you know about specifying a length of zero? I have a family involving a variable number of tieback elements that I'd like to be able to schedule the length of. Visibility is no issue, I can make the tiebacks not used on a particular element invisible, but the smallest I can set their length to is 1", less leads to a "can't create type" error. In larger projects this can lead to significant extra tieback length on our schedules. Any thoughts?
Posted by: Arlo Kirschner | December 01, 2009 at 18:23
Dear Arlo,
The late comment is no problem at all, don't worry.
Yes, I am sorry about this minimum length dimension limit imposed by Revit. As you saw above, this restriction is causing significant problems for others as well. There may well be objects used in buildings that really do need to be modelled accurately with dimensions below this limit. Unfortunately, you will have to make do with some workaround such as letting them appear larger than they really are. Sorry for that.
Cheers, Jeremy.
Posted by: Jeremy Tammik | December 01, 2009 at 19:06
System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at NavisWorks9.LcRevitExportCommand.Execute(Application application, String& message, ElementSet element_errors)
Im getting these errors when exporting from Revit 2012 products to .nwc files
Any ideas?
Posted by: Scott C | October 06, 2011 at 17:10
Dear Scott,
No, sorry, no idea, I have not worked on Navisworks export myself.
Please let us know how you resolve this. Thank you!
Cheers, Jeremy.
Posted by: Jeremy Tammik | October 17, 2011 at 07:01