CyrilWaechter/pyRevitMEP

strange behaviour of function ducts transition elements[BUG]

Closed this issue · 4 comments

Describe the bug
When I want to use Duct transition function, it flushes error window and not connect the ducts
in various cases as seen in videos below.

To Reproduce
Steps to reproduce the behavior:

  1. open model with ducts
  2. use function duct_transition
  3. sometimes You see an error message and no duct is connected.
    3b. sometimes You may connect the same pair of ducts but cursor with "red crossed circle" is visible on cursor - you must clic on Esc button to escape function.
  4. See errors appeared on the recorded videos on two models :
    random ducts in simple model, as in YT video :
    https://youtu.be/DS4RA2pmcFI
    (simple duct model dowloadable in .rvt file of Revit 2019 here: https://drive.google.com/open?id=1r6CMlMo7Z78LQokI9wXii1a068XsVpmk )
    in original project of ventilation system BIM model - video 2:
    https://youtu.be/-fM6iFVm9aU

my assumption is function has bigger troubles to connect ducts which are not actually attachet in some system (unattached) from existing. but this behaviour is also seen in ducts attached to some system.

Expected behavior
Function wil connect ducts wether they are attached or are not attached to some system.
Function will not show error messages.

Screenshots
YT video :
https://youtu.be/DS4RA2pmcFI
YT video 2:
https://youtu.be/-fM6iFVm9aU

Versions (please complete the following information):

  • Revit 2019.2

  • pyRevit: [e.g. 4.7.5, pyRevit dropdown -> About and take a screenshot]
    image

  • pyRevitMEP [e.g. c98e12c, pyRevit dropdown -> Extensions -> Last commit column (this is the hash of the last commit)]
    ef88788

  • rocket mode activated : Yes/No
    yes

  • ironpython engine : [eg. 2.7.7]
    most probably 2.7.3 (2.7.40) on .NET 4.0.30319.42000
    (checked command line of IronPython Console)

  • cpython engine : [eg. 3.7.2]
    not sure where to find the version

Additional context
none

I wish I'd always get bug reports like this ! 👍

I think your issue is related to the way the script works :
When you click on a duct/pipe/family. It find the closest connector from the point you clicked and try to connect the 2 connectors. See image below :
WhereToClick

I have added in commit 2d8a68f :

  • Prevent user from selecting a family as first item. It must be a duct/pipe/cable-tray.
  • An error message which can display image above.
    2020-04-08 03_10_15-Transition

Tell me if it is clear and if it solves all your issues.
(When you rotate in 3D the point you click is sometime unclear. Make sure to click an unambiguous location.)

Note : the script works this way because sometimes you want to clearly choose one of the connector and not any suitable connector (eg. with a Y fitting, 2 suitable connectors and sometimes you don’t want to connect the one closest to the duct open end).

Hello Cyril,
I am back to after repeating the issues and sorting out troubles according to Your suggestion.
Answer if it solves problem is Yes and no. ... surprisingly
for Yes : Yes - it seems that suggested way of selected ducts needs to fit placement closer to another duct - which is valid for both of selected ducts.
for No: I occurred situation where nothing helped else than just restart the Revit.
see the third video where this is visible on some situation
[https://youtu.be/oZJWbjDuDmI]
beginning of video and after restart [2:50 and 4:21] it seemed to become working

There could be something wrong with Revit code. With PyRevit plugin (if it needs to restart sometimes), or more principal, if there is something wrong with Your Operating system (Yes, Bill, I mean Your system) ..

I am encountering actually now with two unpleasant issues :
inability of Windows 10 to turn off itself (terrible)
inability of file search from the "my computer" position in Win Explorer, which is typical issue (i have never encountered situation when this actually works in my OS)
even OS repair in cmd line SFC /scannow showed that integral system files are OK ...
(so If no other user is encountering this issue it seems to be just me the lucky guy)

so for "no" situation, when Your suggestion not works, simply "try to turn off and back on Revit itself" or " try restart OS" in the next possible step..
best regards
R

Hello Richard,
The issue you encounter now is totally different (not same error message) :
Capture d’écran de 2020-04-14 23-02-37

Exception: The reference object is not valid, possibly because it has been deleted from the database, or its creation was undone

I found a subject on this kind of error on stack overflow : Revit API Invalid Object

Also, another user got a similar issue in previous version of pyRevit : #13

  1. First of all, please update pyRevitMEP, I can see that you do not use last version as rpw has been completely removed in last commit : 2d8a68f. (I talk about it in my previous answer)
  2. If it doesn't solve your issue. Try reloading pyRevit (not Revit, just pyRevit)
  3. If it doesn't solve your issue. Please try do deactivate «Rocket-mode» in pyRevit settings.

If 1 solves the issue great ! Nothing more to do.
If 2 or 3 solves the issue maybe I can try something on my side. Else «Rocket-mode» deactivation is probably the best thing to do to avoid this kind of issue (it will just be slower).

Hello Cyril,
Yes You are correct, I had to update the pyRevitMEP .. I am not sure if module reacts on situation when I download the commit from GitHub, so I did step No.2.
Now it seems that it works properly !
Thank You for Your passion in coding