Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to download or open data (list of parts) from Windchill #39

Open
tcrakshi opened this issue Jul 15, 2021 · 8 comments
Open

how to download or open data (list of parts) from Windchill #39

tcrakshi opened this issue Jul 15, 2021 · 8 comments

Comments

@tcrakshi
Copy link

  • Creo version:
  • Creopyson version:
  • Creoson version:
  • Python version:
  • Operating System:

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
@tcrakshi
Copy link
Author

some use case / example code is much appreciable

@Zepmanbc
Copy link
Owner

import creopyson

c = creopyson.Client()
c.connect()

# Here I suppose your workspace is activated
list_of_files = c.windchill_list_workspace_files()

https://creopyson.readthedocs.io/en/latest/creopyson.html#creopyson.windchill.list_workspace_files

@tcrakshi
Copy link
Author

Hi,

Thanks for update,

  1. If part is not available in my local workspace, then I need to search in server, how we can do that?

  2. If part search is succeeded, then how I can download the data into specific local folder? Or how part will open in creo? , Some use case example code is much appreciable.

@Zepmanbc
Copy link
Owner

If part is not available in your local workspace, you can add it if you know its exact name.
If you just want to add it to your workspace and don't open it in creo you can add display and activate args
c.file_open("my_file_name.prt", display=False, activate=False)
This method does not work 100% with recents files, I don't have understand yet if there is a cache not updated for new files or if it is my job's windchill's configuration.

Like said before, you must activate your local workspace in order to add files in it.
If you want add differents files to differents workspaces, you will have to switch between your workspaces.
You can find everything available in Creoson for Workspace management here: https://creopyson.readthedocs.io/en/latest/creopyson.html#module-creopyson.windchill

@tcrakshi
Copy link
Author

tcrakshi commented Jul 19, 2021

I am getting error in c.connect()

#my Code

import creopyson

c = creopyson.Client()
c.connect()  # Errro geeting in this line

Error

    raise ConnectionError(e)

ConnectionError: HTTPConnectionPool(host='localhost', port=9056): Max retries exceeded with url: /creoson (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001BD1C2F2448>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

is it I need to follow any step?

while running this code creo was launched in my machine.
Creo Parametric 6.0.3.0 is using, and python 3.7

@Zepmanbc
Copy link
Owner

Creo and Creoson are running? (only 1 instance of each)

@tcrakshi
Copy link
Author

creo is running, how to check Creoson is running or not?
just i am running python code. is there anything i need to predefined before running python code?

@Zepmanbc
Copy link
Owner

Did you launch Creson? This is the best way to know if it's running.
after configuration you must click on «Start CREOSON»

https://creopyson.readthedocs.io/en/latest/usage.html#quickstart
https://www.youtube.com/watch?v=NjkvRZJQzXs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants