Jump to content
QC102

Printer name - prefix on G Code

Recommended Posts

Posted · Printer name - prefix on G Code

Since the 3.3.1 update, the option to add one's own  printer name  as a prefix to the produced G Code file... is now not possible for those who opt to configure as "Custom"  / FDM printers.   Is this a change in policy or a bug that will be fixed in a next update?

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code

I have no idea why it's not taking your printer name anymore, but in the meantime you can ofc just click the name in the right bottom corner and rename the file...  but easy to forget indeed...

 

 

image.png.933040f7fba3390a694e216e7f91e2c4.png

 

image.png.dd43bf160331d3838182f03e9bb28f1b.png

 

 

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
17 hours ago, QC102 said:

Since the 3.3.1 update, the option to add one's own  printer name  as a prefix to the produced G Code file... is now not possible for those who opt to configure as "Custom"  / FDM printers.   Is this a change in policy or a bug that will be fixed in a next update?

 

I discovered an interesting thing tonight. I loaded simple_vase.STL and the file name in the lower right corner was empty - I twigged that this was down to the upper case file extension and so renamed the file to simple_vase.stl and got the file name appearing as expected - is this just a Linux thing? Anyway, I shall post an issue on github.

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
8 hours ago, ultiarjan said:

I have no idea why it's not taking your printer name anymore, but in the meantime you can ofc just click the name in the right bottom corner and rename the file...  but easy to forget indeed...

 

 

image.png.933040f7fba3390a694e216e7f91e2c4.png

 

image.png.dd43bf160331d3838182f03e9bb28f1b.png

 

 

Hi, Yes I do know  how to edit the file name. I am not alone to mention this "problem" - there have been a few comments on the Anet Geeetech support facebook group. One poster claims that his "name Prefix" us stuck at Prusa i3 - but I rather think he has the wrong setting!  Others have stated their "prefix" for custom.FDM printer ( all Anet A8's or A6 is as seen in your example...CFDMP.    Granted this is more ego than necessity.   I am guessing the software engineers test on the companies own machines.  However cheap and rubbishy as the Anet stuff is.. they do have a mega load of users and I feel it cannot be impossible to include an Anet Profile. After all  there is Tevo and Zonestar and maybe others I do not know about in the cheapo cloned range of printers...not as popular as the A8.    To conclude maybe the I.T.team can look at why this happens  as it obviously indicates something in the code has changed.

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
2 hours ago, smartavionics said:

 

I discovered an interesting thing tonight. I loaded simple_vase.STL and the file name in the lower right corner was empty - I twigged that this was down to the upper case file extension and so renamed the file to simple_vase.stl and got the file name appearing as expected - is this just a Linux thing? Anyway, I shall post an issue on github.

I tried to replicate that by renaming files with upper case file suffix - nothing happened!! I tried on win10 PC and iMac.  So  the guess is...is it a code deciepher issue  on  individual computers...or a Cura code glitch???

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
2 hours ago, billybob884 said:

Is there a way to disable the printer name prefix in front of the gcode filename?

The simple way to avoid any computer name prefix...is un-tick the option in the General Settings.

Share this post


Link to post
Share on other sites
Posted (edited) · Printer name - prefix on G Code
1 hour ago, QC102 said:

The simple way to avoid any computer name prefix...is un-tick the option in the General Settings.

 

...completely missed the option... I checked, too, before asking

Edited by billybob884
added quote

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code

I am  just curios on two point (3rd being ego!)  Is this change which occurred in 3.3.1  Intentional? If so...Why??   which is really for somebody with front office contacts or info.     As an aging  Adult - like many others with the cheapo clones printers.. I like to make it look better, and modify what can  be do to improve for visual aspect. electronically  safer and operating as best it can. Which for a cheapo Anet A8..is not over difficult for even my meager knowledge.  Its just a little quirk that we give the printer "a name" and if the IT team doing Cura wanted to remove that  option... WHY leave us paupers with CFDMP as a prefix.. what on earth is thw sense in that??  As a sulk I have turned off the info share options - so I don't confuse those who check it.

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
On 5/13/2018 at 7:51 AM, billybob884 said:

...completely missed the option.

Found it in Cura 3.6.0 (Linux)
General > Opening and saving files: checkbox "Add machine prefix to job name"

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
9 hours ago, Vijit said:

Found it in Cura 3.6.0 (Linux)
General > Opening and saving files: checkbox "Add machine prefix to job name"

In 3.6.0  I  get this - CFFFP_60mm FanStand-Snap- A8-4.

A8-4 being the printer name -   BUT do we really need to know the actual printer type  CFFFP_  which is not removable - of no interest to me or anybody else and is a stigma  because I use an Anet A8.  

Why not leave it as was -  A8-1_60mm FanStand-Snap  ?

Share this post


Link to post
Share on other sites
Posted (edited) · Printer name - prefix on G Code

How to change the prefix in saved Cura files.

In this example I use a Wanhao i3 plus (for other printers copy the relevant printer file)

Copy the following file to your desktop and rename the copy to your preference:

C:\Program Files\Ultimaker Cura 4.2\resources\definitions\wanhao_i3plus.def.json

I renamed it “wanhao_i3plus_PETG.def.json” in my example

Open the file to alter it, I use a program called “Code Writer”

Within that file, edit the name (line 3) to your preference. Remember the first character of each word in the name will become the prefix of files created, so don’t use spaces between words if needed.

Example:

  "name": "Poly EthyleneTerepthalateGlycol"

Will give the prefix “PE_” (you could also call it P ETG to get the same effect, or start with the printer name)

If you use a single word, you will only get a single character prefix.

Then copy the new altered file back into the folder, you need administrator rights for this.

 

When you open Cura, the printers will now include the one created, and it will still be under the “Wanhao” brand name.

When you select the printer called “Poly EthyleneTerepthalateGlycol” you can then select a material profile to attach to it. Then whenever you open that printer profile in future, it will be attached to that material.

 

For example I have a printer named Poly LacticAcid attached to PLA material (will get “PL_” prefix, and Poly EthyleneTereptheneGlycol attached to PETG material (will get “PE” prefix).

 

Edited by brenyw
typo

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
On 9/10/2019 at 3:43 PM, brenyw said:

How to change the prefix in saved Cura files.

In this example I use a Wanhao i3 plus (for other printers copy the relevant printer file)

Copy the following file to your desktop and rename the copy to your preference:

C:\Program Files\Ultimaker Cura 4.2\resources\definitions\wanhao_i3plus.def.json

I renamed it “wanhao_i3plus_PETG.def” in my example

Open the file to alter it, I use a program called “Code Writer”

Within that file, edit the name (line 3) to your preference. Remember the first character of each word in the name will become the prefix of files created, so don’t use spaces between words if needed.

Example:

  "name": "Poly EthyleneTerepthalateGlycol"

Will give the prefix “PE_” (you could also call it P ETG to get the same effect, or start with the printer name)

If you use a single word, you will only get a single character prefix.

Then copy the new altered file back into the folder, you need administrator rights for this.

 

When you open Cura, the printers will now include the one created, and it will still be under the “Wanhao” brand name.

When you select the printer called “Poly EthyleneTerepthalateGlycol” you can then select a material profile to attach to it. Then whenever you open that printer profile in future, it will be attached to that material.

 

For example I have a printer named Poly LacticAcid attached to PLA material (will get “PL_” prefix, and Poly EthyleneTereptheneGlycol attached to PETG material (will get “PE” prefix).

 

3D printing and the Curse Windows is everywhere!   I use Apple iMac  and iMac Mini .   using a simple text editor - because ""Code Writer" Is a Windows app - I followed the guide and  opted to  chnge the Anet A6 - Anet A8!  3rd line down - changed it..  closed and saved - open 4.2.1 - pop up advises the is a corruption and offer the option to reset - and loose all printer configs - back to factory.  Opened it  up again checked and found  two other instances of A6 so changed them.....same pop up error.   so  opened again and changes all back to the Anet A6 -  saved to close....open 4.2.1. All back to normal.  So its either an imac peculiarity - or the text editor is missing the X factor that is in "Code Writer'. It would be far more simple if Ultimaker restored that rename option. And if any staffers read this... what is the problem letting  we off the lowly A8 clan want to see something better than a group of meaning Letters - that just clutter up the file and force a wait when scrolling down the Anet menu - while the  long file name is rotating around to get to the start.   So I dont and I am sure others just  dont opt to add the printer name - or write it out for the gcode filename.  And in this case why allow the Anet A6 and Not the A8 or other Anet clones????

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
12 minutes ago, QC102 said:

changed it..  closed and saved - open 4.2.1 - pop up advises the is a corruption and offer the option to reset - and loose all printer configs - back to factory

Well, did you just open the files and edited them or did you actually copy them first and renamed them to add them to the original files after editing, as the guide says?

Also, I can't imagine that Apple only has a simple text editor and no other editor in the store with more coding functionality. 

Quick Google brought this up for example:

https://beebom.com/best-text-editors-for-mac/

Share this post


Link to post
Share on other sites
Posted (edited) · Printer name - prefix on G Code
10 minutes ago, Cymon said:

Well, did you just open the files and edited them or did you actually copy them first and renamed them to add them to the original files after editing, as the guide says?

Also, I can't imagine that Apple only has a simple text editor and no other editor in the store with more coding functionality. 

Quick Google brought this up for example:

https://beebom.com/best-text-editors-for-mac/

Tried both ways - first copy and paste to get the file on desktop - edit and drag in the folder - that failed.... just opened  the file and changed - that also failed - and restored it - opened 4.2.1 - no pop up  - no problems.  the Mac OS has  "textedit.app" - which also opens the which opened the .def.json  file - displayed the code and allowed changes. EDIT:  I did the above from the applications folder= Cura was not open.

Edited by QC102
to add bits!

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code

Ok, that is weird, but as I'm only a Windows and Linux User, my knowledge about Apple comes to end end here, sorry.

What else came to my eye:

Quote

C:\Program Files\Ultimaker Cura 4.2\resources\definitions\wanhao_i3plus.def.json

I renamed it “wanhao_i3plus_PETG.def” in my example

He says he renamed it from .def.json to only a .def

Did you rename it to a .def or a .def.json?

Share this post


Link to post
Share on other sites
Posted (edited) · Printer name - prefix on G Code
13 minutes ago, Cymon said:

Ok, that is weird, but as I'm only a Windows and Linux User, my knowledge about Apple comes to end end here, sorry.

What else came to my eye:

He says he renamed it from .def.json to only a .def

Did you rename it to a .def or a .def.json?

Mmm  !  yes  I used the existing suffix .def.json - just assumed the .def was a windows thing!  with  run it through again and  just use .def   EDIT.   Just run through again saved with suffic  just .def   - No errors reported but the file still opens with the original title is I used the Anet A6  file - changed to A8 - so it seems add  that the new saved altered file maintained the original title!

Edited by QC102
update

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code

Glad it works now!

 

To the name, the guide says:

On 9/10/2019 at 7:43 AM, brenyw said:

it will still be under the “Wanhao” brand name

You mean this? So your file is added as a separate file, but with the same name?

As long as it works now... 

Share this post


Link to post
Share on other sites
Posted (edited) · Printer name - prefix on G Code

My mistake on the file extension, should end in .json like the other files. (fixed the post above)

The guide above is for windows, shouldn't be much different for a Mac.

BTW it is worth saving your new printer file in a safe location in case any future Cura update removes it from the list.

You can also change other printer parameters in the file if your printer is modified or different from the one you have copied.

Edited by brenyw
further information
  • Like 1

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
52 minutes ago, brenyw said:

My mistake on the file extension, should end in .json like the other files. (fixed the post above)

The guide above is for windows, shouldn't be much different for a Mac.

BTW it is worth saving your new printer file in a safe location in case any future Cura update removes it from the list.

You can also change other printer parameters in the file if your printer is modified or different from the one you have copied.

I think my post confused you. Must be  my writing "style" 🙂

 

No it does not work for me.  This is the code which appears to be  CSS  ( I do a bit of web building) 

{
    "version": 2,
    "name": “Anet A8”,
    "inherits": "fdmprinter",
    "metadata": {
        "visible": true,
        "author": "Mark",
        "manufacturer": "Anet",
        "file_formats": "text/x-gcode",
        "platform": "aneta8_platform.stl",
        "platform_offset": [0, -3.4, 0],
        "machine_extruder_trains":
        {
            "0": "anet_a6_extruder_0"
        }
    },

    "overrides": {
        "machine_name": { "default_value": "Anet A6” },    <-------------------
        "machine_heated_bed": {
            "default_value": true
        },
        "machine_width": {
            "default_value": 220
        },
        "machine_height": {
            "default_value": 240      <---------------
        },
        "machine_depth": {
            "default_value": 220
        },
        "machine_center_is_zero": {
            "default_value": false
        },
        "gantry_height": {
            "value": "55"
        },
**** I cut the start and end codes.

  "name"  - I changed the one digit  to "8" from 6.  It does not change anything in Cura - I also changed the height size from 250 to 240 - again it did not chnage in Cura - both removed digits - showed  when  Cura is loaded. No sure if its a checksum issue or that  the CSS code is basically the hidden structure code  and what it is supposed to change is already locked on another part of the code.  I am no expert in CSS - but in web stuff,  if I change digits which refer to colours - I get a new colour!   Also as you will have seen in yours -  apart from the "name"  the are other references to the A6. I tried changing them to A8 - but again, saved back to the resources  and  opening Cura - nothing changes visially.

 

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code

I never said it was CSS - I noted that it appeared to be CSS.

Json

  "overrides": {
        "machine_name": { "default_value": "Anet A6” },
        "machine_heated_bed": {
            "default_value": true
        },
        "machine_width": {
            "default_value": 220
        },
        "machine_height": {
            "default_value": 240
        },
        "machine_depth": {
            "default_value": 220
        },
        "machine_center_is_zero": {
            "default_value": false
 

HTML webpage - uses CSS  to create and present what is viewed online ie

 

}
.column-15 {
    width: 15%;
}
.column-20 {
    width: 20%;
}
.column-25 {
    width: 25%;
}
.column-30 {
    width: 30%;
 

So you can see why I commentated - it appears to be CSS.

 

my bit sends the condition on which  the information  from HTML and or Java assembled the visuals.

 

The machine setting example  - IMO - does the same  - its the none visual code that collects the data - which is assembled and presented in the correct state and location.   And its not unknown for code bearing one name/suffix to be used  modified or not  and given a different suffix.     .jpg  .jpeg  might look and be different - but the end product is a visible photo  image!

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code

My original post on this topic was around 12 months ago - the current revival was not at my request - but the  opportunity to make a change is appreciated. However  I have tried the process described above and it does not work on my iMac or mini mac.

Nobody seeing this and being a mac user has come forth to declare success and new info - so  unless it does, this thread is again here should any turn up:)  

 

Thanks to all for hints, tips and suggestion, all appreciated.

Share this post


Link to post
Share on other sites
Posted · Printer name - prefix on G Code
On 9/10/2019 at 3:43 PM, brenyw said:

How to change the prefix in saved Cura files.

In this example I use a Wanhao i3 plus (for other printers copy the relevant printer file)

Copy the following file to your desktop and rename the copy to your preference:

C:\Program Files\Ultimaker Cura 4.2\resources\definitions\wanhao_i3plus.def.json

I renamed it “wanhao_i3plus_PETG.def.json” in my example

Open the file to alter it, I use a program called “Code Writer”

Within that file, edit the name (line 3) to your preference. Remember the first character of each word in the name will become the prefix of files created, so don’t use spaces between words if needed.

Example:

  "name": "Poly EthyleneTerepthalateGlycol"

Will give the prefix “PE_” (you could also call it P ETG to get the same effect, or start with the printer name)

If you use a single word, you will only get a single character prefix.

Then copy the new altered file back into the folder, you need administrator rights for this.

 

When you open Cura, the printers will now include the one created, and it will still be under the “Wanhao” brand name.

When you select the printer called “Poly EthyleneTerepthalateGlycol” you can then select a material profile to attach to it. Then whenever you open that printer profile in future, it will be attached to that material.

 

For example I have a printer named Poly LacticAcid attached to PLA material (will get “PL_” prefix, and Poly EthyleneTereptheneGlycol attached to PETG material (will get “PE” prefix).

 

to clarify:   copy file to desk top - edit and drag n drop back in the same folder it came from - which then overwrites the original files.  So the  the edited copy  no name change - is correct?

 

Also. you say  line three - edit...  but in my iMac file version - its second line...

{
    "version": 2,
    "name": “Anet A6”,
    "inherits": "fdmprinter",

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

×
×
  • Create New...

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!