1

I would like to create one action where I can Exe. the FSP VIEWR to open a image where I can see in 360 degrees.

I tried these 2 options but they didn't work:

1- open ('C:/Users/FSPViewer64.exe')=[%photo%]
2- os.system ('C:/Users//FSPViewer64.exe')=[%photo%]


Attributes table

Well, here you can see that the "photo" is a field where I have the full paths to access the images.

1
  • Sorry i would like to open in Qgis, forget Arcgis Commented Feb 22, 2022 at 17:02

4 Answers 4

0

Add the file path inside the command:

os.system("C:/Users/FSPViewer64.exe [%photo%]")
1
  • Done! Thank you!! It's working perfectly!!! Commented Feb 23, 2022 at 13:40
0

You can use a Python action such as:

import subprocess

softwarepath = "F:\\path\\to\software.exe"
picturepath = "D:\\testpic.jpg"

subprocess.Popen([softwarepath, "[%photo%]"])

Note that the filepath must be correctly stored inside the attribute table (using double backslash or single forwardslash, just like in the picturepath variable) and the variable [%photo%] must be enclosed by quotes.

enter image description here

0

if you have several different images that you want to open with your software: you create a field named "lien" in a Qgis layer in which you paste the full paths to access the images.

on this same layer, you create an action like on the capture. enter image description here

1
  • Hi fcka I tried but didn't work. I have a fiel named photo where I have the full paths to acess the images. I did the same thing but the result is an error saying "it's not possible to execute the comand" Commented Feb 23, 2022 at 10:15
0

@Jigar Narotomo, you have to create a layer and associate a path with each object.

enter image description here

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.