Python: Get executing block as string?

More
3 years 6 months ago #268139 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.

Please Log in to join the conversation.

More
3 years 6 months ago #268846 by HansU
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.

Please Log in to join the conversation.

More
3 years 4 months ago #273921 by tommylight
Spammer booted.

Please Log in to join the conversation.

More
3 years 3 months ago #275292 by chowderhead
Knew nothing about Gstat. Thank you, HansU!

Please Log in to join the conversation.

More
3 years 3 months ago #276301 by gulshan212
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

Please Log in to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum