-
Notifications
You must be signed in to change notification settings - Fork 56
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
add identification selection #162
add identification selection #162
Conversation
mb use folder structure for sorting examples and useful scripts? |
I don't know what you mean here? Your pycatia imports are in the wrong place again. Also, you've done a lot of heavy lifting in your script when you could have used the pre-defined enum types. for example: pycatia/pycatia/enumeration/enumeration_types.py Line 1515 in 51503e3
pycatia/pycatia/enumeration/enumeration_types.py Line 1009 in 51503e3
# import headers
try:
caa = catia()
documents = caa.documents
document = caa.active_document
except CATIAApplicationException as e:
print(e.message)
print('CATIA not started or document not ' +
'opened or started several CATIA sessions')
print('Press any key to exit...')
sys.exit(e.message)
if document.is_part:
# need to autocomplete
part_document = Part(document.part.com_object)
selection = document.selection
try:
part_document.update()
except CATIAApplicationException as e:
print(e.message)
print('Part document must be without errors!')
print('Press any key to exit...')
sys.exit('Part document must be without errors!') I'm going to have to think about whether to simplify this or not. It's not that it's wrong but it's not consistent with the other examples. I'm asking myself:
If anyone else is reading this please feel free to let me know what you think. |
Your pycatia imports are in the wrong place again. PS may be add folder for example : usefull scripts or another example. in catia was cool document: script center) |
You've lost me again. |
formatted for pycatia standarts
yes i saw this. but if u have many examples- its not simple for user |
im formatting code for pycatia standart... |
Agreed. The way I look at it is this. The example should be simple and focus on showing how to use one primary feature / function only. If you need many workbenches to get to that one feature / function so be it. The example will be named according to that concept. Now, more advanced examples may not fall under this idea. I'm open to ideas on how they should be named / structured / presented but they'll still need to all be collected in the examples folder. I'll have a think on this ... might be idea me opening a new issue to see what people think. |
I've created the following to help you set-up your projects correctly. Note how the If you follow the above, try and run your example(s) in the Hopefully, the penny will drop once you follow this. ❓ 😄 |
they work... but i use some other method ( i change it when you note me what i need 2s env). i will try yours,because my dev folder is |
If your examples are running when:
##########################################################
# insert syspath to project folder so examples can be run.
# for development purposes.
import os
import sys
sys.path.insert(0, os.path.abspath("..\\pycatia"))
########################################################## You most likely have Pleeeeeease try and understand the significance of I can't help anymore. |
im not use installed version pycatia because they dont have input box and some other things. |
PS im fix os import |
add identification selection
add example to identification geometry