« Solar Radiation Technology Preview | Main | Categories »

May 17, 2010

Comments

Jeremy, I'm curious of there was ever a bug or feature request to modify that exception message ("failed to insert elbow").

I am running into a similar situation with creating a cross fitting for 4 pipes. As far as I can tell, there should be nothing wrong with the way the pipes are oriented and sized, but a similar InvalidOperationException is thrown with a similarly vague message "failed to insert cross".

Any chance these exception messages could be improved somewhat?

Dear Dave,

No, I am not aware of any such plan. In order to file such a request, we would need a reproducible test case. Please submit a minimal sample model and add-in source code including the complete solution so that we can reproduce the issue, and then we can log a wish for more detailed messages. If you are an ADN member, please submit an ADN DevHelp Online request for it. Thank you!

Cheers, Jeremy.

Ok, will look into that. Thanks.

Dear Jeremy Sir,

How can i create elbow Programatically in Revit MEp 2012.
Pls. Suggest

Thanks & Regards
Namit Jain

Dear Namit,

Simply insert the appropriate family instance.

Cheers, Jeremy.

Dear sir,
How to lock all the elements together programmatically?
For instance, i have two small pipes and i place coupling in between them so they should automatically get locked?
Is this possible with current API(2012)? How?

Thanks & Regards,
-Nitin


Dear Nitin,

I think you have several options for this: you could pin the elements to lock them, or you could create a group of them. You could also use DMU, the dynamic model update mechanism, to ensure that they stay together.

Cheers, Jeremy.

Six real scale cable tray fire tests both in horizontal and vertical orientation to simulate actual end user's environments were carried out.

Electronic cables can create an unsightly mess underneath a desk. Cable trays are a convenient way of organizing your cables and getting them out of sight. These wire mesh trays can be easily installed onto the back of just about any desk (excluding glasstop desks). Though all cable trays will be shaped a little bit differently, basic setup remains mostly the same. Your cable trays should come with all the necessary brackets, screws and bolts necessary for installation.

Hi Jeremy!!
The first, I'm sorry for my english language. I'm starting to learn api for revit. i am trying to make a cable tray fitting and I have follow your code that it help me a lot of. But I've a lot of questions, here some of there:
How can I change the dimensions for each cable tray I create by api in revit?
Can I to indicate a level before create a cable tray?
Is it possible to change the units to S.I. in mm in the Api?
I need to change the units, because I've list of points in ascii files for the situation of the cable trays.
Thank you in advance

Thanks & Regards

Hi Jeremy!
Could you help me please with advice.
I have to create several separate HVAC elements (that are not connected to any other elements). I have only coordinates of center points for Connectors (e.g. for Round Elbow I have 2 points - center of circles at the start and end of Elbow).
To create this elbow I can use method document.Create.NewFamilyInstance(location, FamilyType, StructuralType), but calculate location of Elbow by start and end is impossible.
To use method
document.Create.NewElbowFitting(connector1, connector2);
I need connectors... I can't create connectors, because, as I can understand, it is more logical concept, not physical.
I tried to create Elbow with any location (using NewFamilyInstance method) and then move its connectors to correct position.
(foreach( Connector con in f.MEPModel.ConnectorManager.Connectors ) - get access to connectors),
but all position properties in Connector are readonly.
Could you please give an advice - how can I solve this problem?

Regards,
Olga

Dear Olga,

You create connector objects in the project context by adding connector family elements to the family definition.

These elements are converted to non-element connectors when an instance is placed:

http://thebuildingcoder.typepad.com/blog/2009/04/mep-connectors.html

To change their location in space, you need to transform the entire family instance, e.g. using the functionality provided by the ElementTransformUtils class.

Here is an example:

http://thebuildingcoder.typepad.com/blog/2014/01/explicitly-placing-rolling-offset-pipe-elbow-fittings.html

Cheers, Jeremy.

Thank you Jeremy!

This information was very helpful.
Seems, that I have to create "dummy" ducts and then connect them, using NewElbowFitting/NewTeeFitting.
The only one thing that confuses me - is that we can't manage what type of Fitting Revit will choose.. We have to create correct type of dummy ducts in some positions, that won't give a chance to Revit choose wrong Type of Fitting.
To solve this task automatically seems to me not easy...

Regards,
Olga

Jeremy,

I download the code, and try to run it in my environment, but I always get "Failed insert elbow" error, I have posted one thread in Revit Forum, and attached my code. http://forums.autodesk.com/t5/revit-api/get-quot-failed-to-insert-elbow-quot-when-calling/m-p/5398815

Could you help me to have a look if you have time?

Appreciate for your help.

Thanks,
Gavin

Dear Gavin,

Thank you for your query and posting to the Revit API discussion forum with sample code.

I am taking a look at the issue now for you.

Thank you for your patience.

Cheers, Jeremy.

Dear Jeremy,

How to get the top direction of cable trays in Revit?

Thanks,

Wei

Dear Wei,

I cannot tell you off-hand. I can think of a number of possible approaches. The simplest might be to determine the orientation of the family instance insertion transform. You might also be able to query the connector orientations. You can definitely also analyse the geometry to determine it.

Cheers, Jeremy.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource