drilling element pyton controller for diameter end rough lenght #305
Unanswered
raresgherasimrussen-sketch
asked this question in
General
Replies: 6 comments
|
Once you made sure your element is a drilling using import element_controller as ec
import attribute_controller as ac
import geometry_controller as gc
element_ids = ec.get_active_identifiable_element_ids()
if not element_ids:
print("No active identifiable elements found")
return
for element_id in element_ids:
# make sure it's a drilling axis
if ac.is_drilling(element_id):
# get the diameter and length of the drilling axis
diameter = gc.get_width(element_id)
length = gc.get_length(element_id)
# print result to console
print("Drilling axis %s has a diameter of %s and a length of %s"%(element_id, diameter, length))edit : added missing imports |
0 replies
|
Thank you! It works perfectly! |
0 replies
|
You'll need to substract the overlength |
0 replies
|
Can you help me with one more topic? These controls you gave me, is there a complete documentation (a pdf) somewhere with all the python commands for cadwork? I'm new to this topic and I'm having a hard time finding such documentation.Thanks in advance! |
0 replies
|
This might be helpful indeed 😉 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Hello,
I'm trying to make an API script in Python that will show me the diameter and length of a drilling element in the message bar. I haven't found the attributes that return the two values. I want to get Ø12x148 in the message bar but I can't find what to put in the code to extract these values. Please help.
Rares
All reactions