create parametric objects using the APIs

create parametric objects using the APIs

Anonymous
Not applicable
620 Views
3 Replies
Message 1 of 4

create parametric objects using the APIs

Anonymous
Not applicable

 

Can you also create parametric objects using the APIs?
 
We would like to generate a table to simple objects
eg. cuboid

By example, Type, length, width, height
 
Then gladly also attach additional metadata for each type.

0 Likes
621 Views
3 Replies
Replies (3)
Message 2 of 4

jeremytammik
Autodesk
Autodesk

Dear Dede2286,

 

Before you try to work with the Revit API, it helps to have a basic understanding of the standard product usage from an end user point of view.

 

As soon as you explore the basics of using Revit, you will encounter the concept of families.

 

These represent exactly what you are asking for.

 

They can absolutely be generated programmatically as well:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.25

 

 

In the family environment, basic end user understanding is even more essential than in the project enviornment!

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 4

Anonymous
Not applicable

Thanks Jeremy

Only 1 question
Are there any restrictions on the use of the APIs for generating parametric objects.
eg.

can I use CSG (Void).
is the number of primitives or the parameter limited

Are there any examples to the API

0 Likes
Message 4 of 4

Revitalizer
Advisor
Advisor

Hi DEDE2286,

 

to answer your "only 1" question:

 

Are there any restrictions on the use of the APIs for generating parametric objects.

 

Yes, but not every one is well documented.

E.g. when creating an Extrusion, there is a minimum ratio of thickness to the size of the input curves.

You cannot create one if it would be too flat.

Other restrictions must be evaluated by brute force:

http://thebuildingcoder.typepad.com/blog/2014/05/directshape-performance-and-minimum-size.html

And so on...


eg.

can I use CSG (Void).

 

Yes, you can. There is a BooleanOperationUtils class for use in both project and family context.


is the number of primitives or the parameter limited

 

Don't know, but I think you can add an unlimited number of parameters, especially those which just store geometry independent information, pieces of text, YesNo parameters,...

Have in mind that all of them will be displayed in the properties palette (forcing the user to scroll, scroll,...).

Also, if there are too many parameters to drive the geometry, it may result in constraints errors, dependig on the values you set.

If doing manually, the creator usually "flexes" a Family, testing several value ranges, observing the Family's behaviour.

The more complex, the more possible constraints errors.

Note that API just mimics what the user does.

 

Are there any examples to the API

 

In the SDK, there is a folder named "FamilyCreation".

 

 

Revitalizer

 




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes