Python: Get executing block as string?
- chowderhead
- Offline
- Senior Member
Less
More
- Posts: 57
- Thank you received: 11
03 Apr 2023 01:55 #268139
by chowderhead
Python: Get executing block as string? was created by chowderhead
Hi, All:
Is there a way to get the currently executing block as string in Python? I see the tool path scrolling by in the Axis interface; is there a slick way to grab it from there?
Thanks.
Is there a way to get the currently executing block as string in Python? I see the tool path scrolling by in the Axis interface; is there a slick way to grab it from there?
Thanks.
Please Log in or Create an account to join the conversation.
- HansU
- Offline
- Platinum Member
Less
More
- Posts: 634
- Thank you received: 183
11 Apr 2023 22:36 #268846
by HansU
Replied by HansU on topic Python: Get executing block as string?
You can get the line number and file name and then display the line accordingly.
Not 100% sure if "line-changed" is the correct message, but you can start with this. See linuxcnc.org/docs/html/gui/GStat.html#_messages
And you have "file-loaded" for the file name.
Not 100% sure if "line-changed" is the correct message, but you can start with this. See linuxcnc.org/docs/html/gui/GStat.html#_messages
And you have "file-loaded" for the file name.
The following user(s) said Thank You: chowderhead
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19461
- Thank you received: 6529
20 Jun 2023 11:36 #273921
by tommylight
Replied by tommylight on topic Python: Get executing block as string?
Spammer booted.
The following user(s) said Thank You: chowderhead
Please Log in or Create an account to join the conversation.
- chowderhead
- Offline
- Senior Member
Less
More
- Posts: 57
- Thank you received: 11
12 Jul 2023 19:05 #275292
by chowderhead
Replied by chowderhead on topic Python: Get executing block as string?
Knew nothing about Gstat. Thank you, HansU!
Please Log in or Create an account to join the conversation.
- gulshan212
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 1
26 Jul 2023 12:19 #276301
by gulshan212
Replied by gulshan212 on topic Python: Get executing block as string?
Hello this is Gulshan Negi
Well, Python doesn't have a built-in feature to directly retrieve the currently executing block as a string take reference from here www.techgeekbuzz.com/blog/python-int-to-string-tutorial/.
Thanks
Well, Python doesn't have a built-in feature to directly retrieve the currently executing block as a string take reference from here www.techgeekbuzz.com/blog/python-int-to-string-tutorial/.
Thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.065 seconds