Jump to content
Ultimaker Community of 3D Printing Experts
aolshove

Can't import profile from gcode?

Recommended Posts

When I save a GCode file to disk and then immediately attempt to import the profile settings from that same GCode file I had just created with the currently open session of Cura 3.2.1, I get this error consistently:

 

The machine defined in profile C:/Users/aolshove.xxx/Downloads/Mini_DC_DC_Converter_Box.gcode doesn't match with your current machine, could not import it.

 

This happens with any and all gcode files I attempt to import the profile from.   Example gcode file attached.

 

My original attempt was to import settings from my home Cura into my Work Cura (setup for the same printer that I manage via OctoPrint).  I create a gcode at home and then download it at work and use it to update the profile for further printing tasks while away from home.

 

This is the log entry when I make the attempt:

 

2018-03-06 08:57:51,856 - DEBUG - [(47056)-MainThread] cura.Settings.CuraContainerRegistry.importProfile [188]: Attempting to import profile C:/Users/aolshove.xxx/Downloads/Mini_DC_DC_Converter_Box.gcode

 

I've tried changing the printer to various names on the Work side to try to match to my home printer definition and have tried modifying the printer names in the gcode file to match but that didn't work either.  Funny thing is that no matter what I name my machine in my Work Cura, it writes to the gcode file as "prusa_i3".

 

Any help would be appreciated.  Thanks!

 

Please let me know of additional documents, settings that would help.  Cura 15.04.6 really worked well for me and allowed convenient profile updates and I would like to move over to 3.2.1.

 

Mini_DC_DC_Converter_Box.gcode

Share this post


Link to post
Share on other sites

Cura 15.X used to have this wonderful feature where the last line in the file contained all the settings (meant to be read by a computer, not a human).  This also allowed the great feature "import profile from gcode" which allowed one to alter all the cura settings to the settings used to make a particular gcode file.

 

Cura 2.X and 3.X don't do this.  They don't write all the settings to the gcode file and they don't read settings from a gcode file.  I suspect this is what you were looking for.

 

Instead there is a new feature called "save project".  This is actually in some ways better than the old feature.  It saves all the settings and also it saves the position and scaling of every part and it saves the contents of the STL files such that when you load the project all the parts are there on the bed in the same position/orientation and with the same settings as when you saved the project.

 

Therefore EVERY time I create a gcode file I also save the project.  That way I can go back later and see the settings.

 

I'm not sure if this carries across versions of Cura (I think it mostly works).  In other words if you save in cura 3.0 can you read the project in cura 3.1?  I think maybe it mostly works.  Not sure.

 

Share this post


Link to post
Share on other sites
40 minutes ago, gr5 said:

Cura 15.X used to have this wonderful feature where the last line in the file contained all the settings (meant to be read by a computer, not a human).  This also allowed the great feature "import profile from gcode" which allowed one to alter all the cura settings to the settings used to make a particular gcode file.

 

Cura 2.X and 3.X don't do this.  They don't write all the settings to the gcode file and they don't read settings from a gcode file.  I suspect this is what you were looking for.

 

Instead there is a new feature called "save project".  This is actually in some ways better than the old feature.  It saves all the settings and also it saves the position and scaling of every part and it saves the contents of the STL files such that when you load the project all the parts are there on the bed in the same position/orientation and with the same settings as when you saved the project.

 

Therefore EVERY time I create a gcode file I also save the project.  That way I can go back later and see the settings.

 

I'm not sure if this carries across versions of Cura (I think it mostly works).  In other words if you save in cura 3.0 can you read the project in cura 3.1?  I think maybe it mostly works.  Not sure.

 

 

No disrespect intended but you are incorrect.  Cura 3.2.1 absolutely saves profile info at the bottom of the gcode and there's an option in the Settings->Manage Profiles screen called "Import" that allows the selection of a gcode file for the purpose of importing profile info.  This feature is broken (for me at least) but I believe that it is intended to work as implemented.

 

I also found the Save Project option and it works fine but I would like for the Import Profile feature to function or to be removed in favor of the Save Project.  Do the Cura developers read these forums or are they only for end-user support?

 

    

Share this post


Link to post
Share on other sites

It's okay - people call me wrong all the time - I try to take it gracefully.

 

1 hour ago, aolshove said:

Settings->Manage Profiles screen called "Import"

Oh my!  Wow.  I didn't know that was there - never saw that before.

 

1 hour ago, aolshove said:

Do the Cura developers read these forums

Yes.  But there's a lot for them to read.  The best place is to post bug reports in github but I can get the attention of a dev for you.  @ghostkeeper - how long has cura been able to import profile settings from gcode?  Does this work?  Does it import across versions of cura?

Share this post


Link to post
Share on other sites

Feel free to call upon @ghostkeeper to get my attention any time :p I love answering such questions. I know that Nallath regularly keeps up with the goings on here and Msuurmond sometimes too. And many of us keep a close eye on the Cura Beta and Release threads.

 

Cura has been able to import profile settings from g-code for a very long time. Like, 2.1 or so? It was one of the first things that I implemented for the Cura front-end. The purpose of this was to be able to debug when a user has a problem with their g-code. We can sort of track down what settings were changed from the defaults, even though it doesn't save which default profiles were selected (only the custom profile and the unsaved setting changes). The settings are stored at the end of the g-code in a few comments.

Only in release 3.2 there was a bug that caused the settings to no longer be stored there. I suppose importing them is still working fine (didn't try) but the settings aren't saved to the g-code any more. Recently there was an attempt to fix it, but today I tested that fix and had to fail that test because it didn't save the current (unsaved) changes.

 

It should (if memory serves) also work across versions of Cura. That is, if it encounters settings that have been renamed or metadata in an old format, it should attempt to update those, like any other profile importer.

Share this post


Link to post
Share on other sites
6 minutes ago, ghostkeeper said:

Feel free to call upon @ghostkeeper to get my attention any time :p I love answering such questions. I know that Nallath regularly keeps up with the goings on here and Msuurmond sometimes too. And many of us keep a close eye on the Cura Beta and Release threads.

 

Cura has been able to import profile settings from g-code for a very long time. Like, 2.1 or so? It was one of the first things that I implemented for the Cura front-end. The purpose of this was to be able to debug when a user has a problem with their g-code. We can sort of track down what settings were changed from the defaults, even though it doesn't save which default profiles were selected (only the custom profile and the unsaved setting changes). The settings are stored at the end of the g-code in a few comments.

Only in release 3.2 there was a bug that caused the settings to no longer be stored there. I suppose importing them is still working fine (didn't try) but the settings aren't saved to the g-code any more. Recently there was an attempt to fix it, but today I tested that fix and had to fail that test because it didn't save the current (unsaved) changes.

 

It should (if memory serves) also work across versions of Cura. That is, if it encounters settings that have been renamed or metadata in an old format, it should attempt to update those, like any other profile importer.

 

Thanks for the attention on this.  It sounds like a feature that isn't widely used.  I only found it extremely useful as it was a convenient method for me to move my settings between instances of Cura without uploading an actual profile file up to a file store and then download it at another location.  Instead, I could access the web interface for my printer, OctoPrint in this case, and download the active gcode currently in the queue, and use it to import the most recent settings into whatever workstation I was running Cura on at the time.  Now it appears that the concept of machine within the gcode's end profile data is causing me some issues.

 

IF this feature is truly just a debugging tool from days past and isn't valued very much anymore in its current state, could you perhaps remove the condition for machine ID from the gcode import function so that the core result of getting profile settings would work no matter what machine is being used?

 

Thanks.

 

 

 

Share this post


Link to post
Share on other sites

We're repairing the feature for 3.3, because:

  • We were getting lots of feedback from people that were using it to sort of be able to reslice their prints.
  • Our customer service department was using it to check if people were really really really not setting their settings to something weird.
  • It was causing a bug in the UM2 firmware to surface that caused a big blob at the end of the print.
  • It was caused by a bug in the first place.
  • Like 1

Share this post


Link to post
Share on other sites
14 minutes ago, ghostkeeper said:

We're repairing the feature for 3.3, because:

  • We were getting lots of feedback from people that were using it to sort of be able to reslice their prints.
  • Our customer service department was using it to check if people were really really really not setting their settings to something weird.
  • It was causing a bug in the UM2 firmware to surface that caused a big blob at the end of the print.
  • It was caused by a bug in the first place.

 

Awesome!  I will await 3.3 patiently.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!