Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

MacOS Python PATH_OPENSTATION and FILE_OPENSTATION return incorrect

#1
Code:
import sys
import subprocess
from robodk.robolink import Robolink, PATH_OPENSTATION, FILE_OPENSTATION

subprocess.check_call([sys.executable, "-m", "pip", "show", "robodk"])

rdk_path = '/Users/brandon/Documents/mecaStation12.rdk'

RDK = Robolink()

print(f'1: "{RDK.getParam(PATH_OPENSTATION)}"')
print(f'2: "{RDK.getParam(FILE_OPENSTATION)}"')
RDK.AddFile(rdk_path)
print(f'3: "{RDK.getParam(PATH_OPENSTATION)}"')
print(f'4: "{RDK.getParam(FILE_OPENSTATION)}"')
Relevant output:
Quote:Name: robodk
Version: 5.5.5
Starting  RoboDK  v 5.5.3 . 23011  ...
OS:  MAC64
Date build:  Dec 22 2022
1: ""
2: ""
3: "/Users/brandon/Documents"
4: "/Users/brandon/Documents/mecaStation12.rdk"
Output 3 should be a full path to the rdk file, not to the containing folder
Output 4 should be a file name, not a full path
#2
Are you working with a new RoboDK project?

You should save or load an RDK project file to see the path where it is stored.
#3
Hi Albert,

I load the project in the sample code above. Specifically: RDK.AddFile(rdk_path)

The issue is the calls do not return the values specified by their documentation.
  




Users browsing this thread:
1 Guest(s)