Revit API

Reply
Contributor
tatepoon
Posts: 17
Registered: ‎06-20-2013
Message 1 of 5 (194 Views)
Accepted Solution

NewDuct creates duct without MEPSystem

194 Views, 4 Replies
12-04-2013 12:59 AM

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?

ADN Support Specialist
augusto.goncalves
Posts: 310
Registered: ‎04-30-2009
Message 2 of 5 (165 Views)

Re: NewDuct creates duct without MEPSystem

12-12-2013 05:31 AM in reply to: tatepoon

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
Autodesk Developer Network
Contributor
tatepoon
Posts: 17
Registered: ‎06-20-2013
Message 3 of 5 (158 Views)

Re: NewDuct creates duct without MEPSystem

12-12-2013 04:50 PM in reply to: augusto.goncalves
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).
ADN Support Specialist
augusto.goncalves
Posts: 310
Registered: ‎04-30-2009
Message 4 of 5 (140 Views)

Re: NewDuct creates duct without MEPSystem

12-16-2013 08:32 AM in reply to: tatepoon

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
Autodesk Developer Network
Contributor
tatepoon
Posts: 17
Registered: ‎06-20-2013
Message 5 of 5 (104 Views)

Re: NewDuct creates duct without MEPSystem

01-17-2014 12:33 AM in reply to: augusto.goncalves

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
)

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Revit Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Revit helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Revit

Twitter

Facebook

Blogs

Youtube