Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NewDuct creates duct without MEPSystem

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
tatepoon
675 Views, 4 Replies

NewDuct creates duct without MEPSystem

I am using the following API to create duct that is not connect to anything in Revit 2013.

 

Document::NewDuct Method (XYZ, XYZ, DuctType)

 

Then the MEPSystem of the created Element is null.

The System Type is displayed as "Undefined" in the Properties Palette.

 

Is there any way to create a default system for it?

4 REPLIES 4
Message 2 of 5

Hi,

 

The documentation says that a Duct that don't belong to any system will return MEPSystem as NULL/Nothing. Also, this property is read-only, so even by creating a new system, you cannot set it to the Duct.

 

Hope this clarifies.



Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 3 of 5

So, how can we create a duct with the same result as we create it in Revit UI (such a duct has a MEPSystem even if it is not connected to anything).
Message 4 of 5

The 2013 don't have many alternatives, the NewDuct method don't offer a parameter for it...

 

It may be possible on 2014 as the Duct.Create have more options, in case you would like to try.

 

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 5 of 5


@augusto.goncalves wrote:

The 2013 don't have many alternatives, the NewDuct method don't offer a parameter for it...

 

It may be possible on 2014 as the Duct.Create have more options, in case you would like to try.

 


 

Yes, the following API can solve the problem in Revit 2014. In Revit 2013, I can only create such a duct by copying an existing duct instance.
public static Duct Create(
	Document document,
	ElementId systemTypeId,
	ElementId ductTypeId,
	ElementId levelId,
	XYZ firstPoint,
	XYZ secondPoint
)

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community