I've spent a few hours searching, and trying different things, but I can't seem to get or set the Panel that a device is connected to.
For example, if I select a receptacle, I want to be able to see and change the Panel that receptacle is connected to.
I've managed to get the connector for the selected item and assign it to "c". But I cant get any farther.
I've tried:
MEPFamilyConnectorInfo famConnInfo = c.GetMEPConnectorInfo () as MEPFamilyConnectorInfo ; ParameterValue param = famConnInfo.GetConnectorParameterValue( new ElementId(BuiltInParameter.RBS_ELEC_CIRCUIT_PANEL_PARAM)); TaskDialog.Show("RBS ELEC CIRCUIT PANEL PARAM:", param.ToString ());
I can't seem to convert the ParameterValue param to anything useful. Trying to use .ToString() causes an error.