I am Working on a Dynamo Script and i have come across an issue. i work with the Sysque extension for Revit pipe hanger and i am trying to create a script to update the system type parameter of the hangers to match the system type of the pipe that is was placed on (for scheduling). to do this, the script draws a pipe from one of the connectors of the hanger and appropriately changes they system type by swapping the type of the pipe (which then propagates and applies to the hanger) this all works great except when i try to delete the pipe after the hanger has been updated. there are 3 cases that each give my a different result.
Case 1: if i use the script to create the pipe and then in actual REVIT, delete the pipe by selecting it and delete—> the desired outcome occurs, the hanger keeps the system type and system abbreviation from the pipe after it is deleted
Case2: if i use the same scrip to delete the pipe( ie. after pipe has been drawn by the script and the parameter updated, the script then deletes the pipe) the parameter of the hangers get reverted to Undefined (i want the hanger parameter to stay)
Case 3: if i split the Case 2 script into 2 separate scripts (ie. 1st scrip draws the pipe and updates the hanger parameters, and then the 2nd separate script navigates to and deletes the pipe–> 2 buttons to click in the dynamo player) in this case where the scripts are separate, the properties of the hanger are not reverted to undefined (system type/abbreviation stays)
- i am wondering why this is happening and why i cannot both create and delete the pipe in the same script without having the hanger parameters revert to Undefined