I'm running Workbench 2016 - 32 bit on Citrix XenApp v 6.5. and use quick translator to export Smallworld 5.1 data to .dgn format. How do I configure the port in my .fmw file to use the port assigned to my Smallworld session.
Hi @borochri. Have you seen this article Connect to Smallworld on working with FME and Smallworld?
and linked it to the server port parameter. That way, when I open quicktranslator and select the .fmw file, I get prompted for the port number, and I can enter it. However, this is not a good solution for end users who will use this daily. I think a SW magik code
solution may be necessary that passes in the port number being used in the
session and automatically uses it for the translation.
Two reference articles I used are:
https://knowledge.safe.com/articles/223/can-i-pass-a-variable-to-fme-to-replace-a-fixed-va.html?smartspace=fme-desktop-workbench-scripting
https://knowledge.safe.com/articles/1287/published-parameter-examples.html
Hi @borochri, when you open the Smallworld FME Translator session – that is, within the Smallworld application itself – will the port ever be different or is it always, for example, 30000?
If it changes, I think that the workaround you have identified in your comment by using a Published Parameter, so that the user is prompted on Run, is the best method. There is no programmatic way to launch the session on Smallworld and have FME automatically be aware of this, that I know of.
If the port number is static, you might be able to leverage the "My Defaults" for the Smallworld Reader (or Writer). Open the parameters (on the Add Reader / Writer dialog) and once you have entered the hostname and port, etc., you can select to "Save as My Defaults". Though in my experience you have to return to this dialog and select "Reset to My Defaults" – if that is too much overhead, the next idea might work...
Navigate to the sworldswaf.fmf file located in <FME_InstallDir>\\metafile and open it in a text editor. You can do a Find and Replace operation on the port number (default 30000) – there were 3 occurrences to address in this file when I tested.
Hope that helps!
Hi @borochri, when you open the Smallworld FME Translator session – that is, within the Smallworld application itself – will the port ever be different or is it always, for example, 30000?
If it changes, I think that the workaround you have identified in your comment by using a Published Parameter, so that the user is prompted on Run, is the best method. There is no programmatic way to launch the session on Smallworld and have FME automatically be aware of this, that I know of.
If the port number is static, you might be able to leverage the "My Defaults" for the Smallworld Reader (or Writer). Open the parameters (on the Add Reader / Writer dialog) and once you have entered the hostname and port, etc., you can select to "Save as My Defaults". Though in my experience you have to return to this dialog and select "Reset to My Defaults" – if that is too much overhead, the next idea might work...
Navigate to the sworldswaf.fmf file located in <FME_InstallDir>\\metafile and open it in a text editor. You can do a Find and Replace operation on the port number (default 30000) – there were 3 occurrences to address in this file when I tested.
Hope that helps!
For the version of Smallworld that we are running in our test environment, the FME GUI is launched independently of and not within Smallworld. It works well when you are running locally on a desktop because Smallworld will always assign port 3000. The problem with terminal server is that there are multiple sessions and only one can have that number. We are currently exploring the option of adding FME to a Smallworld drop down menu and incorporating SW magik code to capture the port number being used in the session and passing it to FME. I was hoping that there was a variable - perhaps like "%" or "&" that you could use instead in the port setting so that you could use something like "300%%" that would work for 30000, 30001, etc.
Thanks again for your response.