BHoM / Revit_Toolkit

A set of tools enabling exchange of information between BHoM and Revit.
GNU Lesser General Public License v3.0
27 stars 13 forks source link

Revit_Toolkit: Requirement for Update Ports #792

Closed kayleighhoude closed 3 years ago

kayleighhoude commented 4 years ago

Description:

Upon rebuilding Revit Toolkit/downloading a new installer, requirement for "Update Ports" on RevitListen in order for objects to pull across. I've experienced this on both my machine and others. image

Steps to reproduce:

Expected behaviour:

Test file(s):

pawelbaran commented 4 years ago

@kayleighhoude did you have only one instance of Revit running? This part of the code base had not been changed for months, so that sounds very surprising to me... Plus it works like charm on my machine 🙈

kayleighhoude commented 4 years ago

@pawelbaran just one instance (I had just reopened because I just re-built) this happens often for users downloading a new alpha/beta that they have to Update Ports in order to get a pull to work

pawelbaran commented 4 years ago

Are you able to reproduce that issue reliably (repetitively)? That would be extremely helpful.

kayleighhoude commented 4 years ago

@pawelbaran just tried repeating with the beta and it didn't occur. I have seen the issue numerous times though. When should you have to click update ports?

pawelbaran commented 4 years ago

Only when you want to use different ports than default (e.g. when you want to use Revit_Toolkit with a few instances of Revit open). In the Wiki I've explained it as follows:

Both ends of the Adapter communicate with each other based on Sockets - it is important to set same socket ports on both ends (otherwise they will not see each other). There should be only one Revit instance open per each port couple, therefore, if one wants to work with more than one instance of Revit at the same time, it is recommended to change ports. In case of only one Revit instance running, default ports (14128, 14129) are suggested.

To change the default ports on the UI side, RevitSettings.ConnectionSettings need be overwritten.

For reference: https://github.com/BHoM/Revit_Toolkit/wiki/Revit-Adapter-basics

pawelbaran commented 4 years ago

I think I've reproduced the issue by opening/closing different versions of Revit, seems that is it similar to https://github.com/BHoM/Revit_Toolkit/issues/257. I will try to investigate it further at some point of this Milestone.

pawelbaran commented 3 years ago

@kayleighhoude does this issue still occur? In the course of investigation of https://github.com/BHoM/Revit_Toolkit/issues/257#issuecomment-705640606, I experienced the need to refresh the ports only when starting and closing Revit/Rhino (i.e. when the connection is lost), which I think is inevitable and acceptable (if you restarted Revit or Rhino, refreshing the adapter on both ends sounds reasonable). So it tempts me to close this issue 😉

kayleighhoude commented 3 years ago

@pawelbaran still happens to me frequently, even if I only have one session open when doing the initial pull.

pawelbaran commented 3 years ago

And what if you simply try pulling again? The very first pull in a session sometimes fails (on my machine not too often, but maybe depends on the build), but for me re-activating the Pull usually works - I never needed to mess with the ports in Revit.

kayleighhoude commented 3 years ago

@pawelbaran that's usually my first step, true/false on the active and then I go to the port as the second step. That works every time, but as a new user I wouldn't know to do it.

pawelbaran commented 3 years ago

I think it will be hard to make the adapter work every time, especially on the 1st pull. However, what can (and should) be improved is the error message, to include the suggestion on the actions that can help. I will keep the issue open until the message becomes more informative.