What's new

Welcome to the GSA Community!

This is the Official User Community for GE's GeoSpatial Analysis products. By registering with us, you'll be able to discuss, share and private message with other members of our Community.
Registration is currently only allowed with a personalized invitation code, which you might have received previously. If you haven't got one:
please get in touch with your GE contact person or your regional moderator(s): see FAQ.

SignUp Now!

How to pass parameters to Smart Link

yosuke.takahashi

Member
Confirmed GSA Customer
Joined
Sep 28, 2020
Messages
8
Hi,

I would like to pass parameters to Smart Link in GSA Desktop.
For example, I would like to launch an Excel file(or batch file, etc) with parameters from GSA.

1605687744983.png
I create a SmartLinkToDocument field.

1605687805255.png
I can open the excel file.

1605687934287.png
I try to pass arguments.

1605687969800.png
The excel file won't open, because "foo baz" arguments are considered as the part of the filename

Can't Smart Link use parameters in GSA Desktop?

I would appreciate any workarounds.

Regards,
Yosuke
 

Frank Pistorius

Spatial Eye
Confirmed GSA Customer
Joined
May 26, 2020
Messages
36
Hi Yosuke,

This used to be possible by using the '|' character to separate the full path of the document and the arguments (ie "C:\GSA\Sample.xlsx|foo bar").
From what I can tell, this trick doesn't seem to work anymore.

I suggest you submit an enhancement request via your support channel.

Regards,

Frank
 

yosuke.takahashi

Member
Confirmed GSA Customer
Joined
Sep 28, 2020
Messages
8
Hi Frank,

Thank you for your response.

I didn't know your workaround. It is unfortunate that it doesn't seem to work in GSA 5.2.5.

I would like to pass the attributes(id, values) of an object to the Smart Link document(.xlsx, .bat, .ps1, etc) so that external scripts can handle the parameters passed by GSA.

I will submit an enhancement request if there are not any possible ways.

Regards,
Yosuke
 

Frank Pistorius

Spatial Eye
Confirmed GSA Customer
Joined
May 26, 2020
Messages
36
Hi Yosuke,

It is good to know that this only worked for cmd/batch files, but this easily allows you to fire up external programs (like Excel) yourself.
Good if you submit an enhancement request via support, so this can be picked up from there.

Regards,

Frank
 

yosuke.takahashi

Member
Confirmed GSA Customer
Joined
Sep 28, 2020
Messages
8
Hello.

We are happy that our enhancement request is implemented in GSA 5.2.6.


Examples above are cmd or excel files. If you would like to parameters to Powershell scripts, write an expression as follows.

SmartLinkToDocument("Powershell| C:\Users\user\argumentsSample.ps1 " + [id].ToString() + " " + [name])

I have confirmed that it worked well in the pre-release 5.2.6 version. Thank you for your prompt fix.

Regards,
Yosuke
 
Top