Save Robot Program

Tagged: ,

This topic contains 4 replies, has 3 voices, and was last updated by Keke Keke 3 weeks, 2 days ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10684
    Keke
    Keke
    Moderator

    Hi,

    Christmas is coming and everyone wants to save their robot programs so they can go and have peaceful Christmas holiday. Well here’s an add-on that lets you save and load robot programs in XML format.

    Known limitations:

    • Topology paths (Premium) are loaded without rebuiling properties (select curve, smoothing).

    -k

    —–

    version 1.01:

    • fixed future bugs on ElementTree null checks

    version 1.02:

    • fixed bugs with property units
    Attachments:
    You must be logged in to view attached files.
    #10735
    Keke
    Keke
    Moderator

    Note that this is not a post-processor for real robot programs. This add-on is only used for saving and loading programs on robots in VC environment.

    -k

    #15988
    Avatar
    mike919
    Participant

    Hi

    I believe I found an error with the openProgram.py script.  On line 463 there is this code:

    But the prop.Unit property appears to be read only so there is an error when it executes.  I got it working for my case with this:

    Its not elegant, it would require quite a large if statement to catch every possibility.  Not sure if there is a better way to implement it.

    Thanks

    #16511
    yelan123
    yelan123
    Participant

    Cool!

    #16519
    Keke
    Keke
    Moderator

    Hi Mike919,

    Thanks for the feedback. It was a bug that I didn’t catch in testing. Unit is indeed read only and you have to play with it using Quantity property and setUnitMagnitude method. So now the code is like this:

    I fixed it in the OP attachment. Note that property value is always in the so-called canonical form (e.g. millimeters) and magnitude determines how the value is shown in UI. I tested this fix only a little but for distance types it seems to work.

    -k

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.