12/12/2018 at 11:42 #10684
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.
- Topology paths (Premium) are loaded without rebuiling properties (select curve, smoothing).
- fixed future bugs on ElementTree null checks
- fixed bugs with property units
Attachments:You must be logged in to view attached files.
You need to login in order to like this post: click here13/12/2018 at 12:49 #10735
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.
You need to login in order to like this post: click here01/08/2019 at 10:33 #15988
I believe I found an error with the openProgram.py script. On line 463 there is this code:Python12if unit_string:prop.Unit = app.findUnit(unit_string)
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:Python1234if unit_string == 'millimetres' or unit_string == 'inches':prop.Quantity = app.findQuantity('Distance')elif unit_string == 'millimetres per second' or unit_string == 'inches per minute':prop.Quantity = app.findQuantity('Velocity')
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.
You need to login in order to like this post: click here24/08/2019 at 02:45 #1651126/08/2019 at 10:02 #16519
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:Python1234unit = app.findUnit(unit_string)if unit:prop.Quantity = unit.Group.Nameprop.setUnitMagnitude(unit.Factor)
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.
You need to login in order to like this post: click here
You must be logged in to reply to this topic.