- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am writing an add-in where I want to assign the base equipment to a mechanical system (duct). The equipment that I want to add to the system is already associated with the system in question. It, however, is not listed as the BaseEquipment. The mechanical equipment family instance can found under system.elements. From my understanding, this is where all of the air terminal family instances are located. A user can manually assign the piece of equipment to the system, effectively making it the BaseEquipment for that system, by using the UI. This is done by selecting an element on the desired system, and then switching to the "Duct Systems" contextual ribbon tab. From there the command "Select Equipment" will allow the user to manually designate equipment for that specific system.
So I know what I am trying to do is possible. But perhaps not through the API...
From the API docs, it appears that MechanicalSystem.BaseEquipment is read-only, so I cannot directly assign an element (Mechanical Equipment) as the BaseEquipment. I thought maybe, I could do this via the BaseEquipmentConnector, but upon assigning the connector like so:
system.BaseEquipmentConnector = baseConnector;
I get an exception indicated that the connector is already in use.
I've also tried deleting the system, and then creating a new system using:
doc.Create.NewMechanicalSystem(baseConnector, connectors, sysType);
However, I get the same exception error listed above about the connector already being in use. I even went as far as using one transaction to delete the system, and then another to create the new one.
If anyone could provide some insight or even a solution that would be great!
Thanks
Solved! Go to Solution.