fieldOfView / Cura-CustomJobPrefix

A Cura plugin that lets the user set a custom print job prefix
GNU Affero General Public License v3.0
24 stars 5 forks source link

Add {profile_name} as a replacement pattern #6

Closed mtw3d closed 4 years ago

mtw3d commented 4 years ago

Would it be possible to add {profile_name} to the list of available replacement patterns? I don't like the way that Cura handles materials, so I use profiles for everything, so I have a profile name that probably already resembles the prefix that you are adding. I now am adding it manually when I save my files, but doing it automatically would be a huge benefit.

Thank you!

fieldOfView commented 4 years ago

It would be up to you to make sure your profile names are short then. I sort of want to prevent the prefixes to become comically long.

Consider it considered for a future version.

Note to self: don't forget about material display name.

mtw3d commented 4 years ago

That is reasonable. For my use case that would not be an issue, since everything I need is already included in my profile names. I use a profile name like "XL_0804_PLA" which tells me the printer it's for (my large format printer), the nozzle diameter and layer height (0.8mm and 0.4mm) and the material. The main thing I want is to be able to add that at the beginning of the file without having to manually add it everytime.

xh3dx commented 4 years ago

I would like to 2nd this request. I have different profiles and one of them is (for now) is optimized for use with OctoLapse, would like to be able to automatically have this information.

DotNetRob commented 4 years ago

I also 2nd the request, would be nice to have the profile in the name.

fieldOfView commented 4 years ago

It would help a lot if you could test this development snapshot for me. Download the file and drag it onto the buildplate in Cura as if you were loading a 3d model.

xh3dx commented 4 years ago

Followed your instructions and loaded up a cal cube. Tested both {profile_name} and {profile_name_full}. They both work for me. Thank you for your work.

fieldOfView commented 4 years ago

Great, thanks for testing.

mtw3d commented 4 years ago

Works for me with {profile_name_full}. {profile_name} gave me unexpected results, but I assume it is exactly what you intended. The first letter and the last three letters (or possibly the last word) of the profile name.

Thank you!

fieldOfView commented 4 years ago

The {profile_name} one is abbreviated with the same rules that are also used for the printer name. It uses the first letter of each word, unless the word is 4 characters or fewer. Numbers are included as-is.