Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Center Dot Character in macros

    Scheduled Pinned Locked Moved Solved
    Duet Web Control
    5
    20
    832
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DonStaufferundefined
      DonStauffer
      last edited by DonStauffer

      Fairly trivial question, but maybe easily answered:

      I created a macro file in Windows that includes the center dot character (Alt-0183). When I uploaded the macro it shows that character in the editor on the web interface as a diamond with a question mark in it. But in the editor, I can type Alt-0183 and it puts a center-dot character in just fine.

      EDIT: I was only using it as a comment divider.

      Is there a way to get the center dot character to transfer correctly via the web interface?

      Thanks!

      dc42undefined 1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by

        A simple dash wouldn't suffice?

        Adding special characters to a macro seems imprudent.

        Z-Bot CoreXY Build | Thingiverse Profile

        DonStaufferundefined 1 Reply Last reply Reply Quote 0
        • DonStaufferundefined
          DonStauffer @Phaedrux
          last edited by

          @phaedrux This macro is about 150 pages long. I have levels of comments, some differentiated by a line of characters in a comment. Dash is already used for another comment level.

          Phaedruxundefined 1 Reply Last reply Reply Quote 0
          • OwenDundefined
            OwenD
            last edited by

            I'm pretty sure G Code (which includes macros) must only be ASCII printable characters, so I'd be surprised if the interpreter didn't throw a fit with what you propose.
            Perhaps if it was on a commented line it would be ignored, but it is going down a slippery slope.

            DonStaufferundefined 1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @DonStauffer
              last edited by

              @donstauffer said in Center Dot Character in macros:

              Fairly trivial question, but maybe easily answered:

              I created a macro file in Windows that includes the center dot character (Alt-0183). When I uploaded the macro it shows that character in the editor on the web interface as a diamond with a question mark in it. But in the editor, I can type Alt-0183 and it puts a center-dot character in just fine.

              EDIT: I was only using it as a comment divider.

              Is there a way to get the center dot character to transfer correctly via the web interface?

              Thanks!

              It should work if you make sure that your editor saves the file in UTF8 format.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              DonStaufferundefined 2 Replies Last reply Reply Quote 0
              • DonStaufferundefined
                DonStauffer @OwenD
                last edited by

                @owend It's just a number in any case, and part of a comment. And the editor allows it. Only the upload does something special with it.

                1 Reply Last reply Reply Quote 0
                • DonStaufferundefined
                  DonStauffer @dc42
                  last edited by DonStauffer

                  @dc42 It's written by VBA, not an editor. I'll see if there's an option.

                  1 Reply Last reply Reply Quote 0
                  • DonStaufferundefined
                    DonStauffer @dc42
                    last edited by DonStauffer

                    @dc42 Perfect, thanks! This worked:

                    Private Const CENTER_DOT_CHAR As String = "·"

                    Public Sub Test()
                    Dim sFilename As String
                    sFilename = "C:\Users\Don\3D Printing\Software\Slicing\FeatureSettings\TestDot"
                    Dim fsT As Object
                    Set fsT = CreateObject("ADODB.Stream")
                    fsT.Type = 2 'Specify stream type - we want To save text/string data.
                    fsT.Charset = "utf-8" 'Specify charset For the source text data.
                    fsT.Open 'Open the stream And write binary data To the object
                    fsT.WriteText ";special characters: " & String(10, CENTER_DOT_CHAR)
                    fsT.SaveToFile sFilename, 2 'Save binary data To disk

                    End Sub

                    1 Reply Last reply Reply Quote 1
                    • Phaedruxundefined
                      Phaedrux Moderator @DonStauffer
                      last edited by

                      @donstauffer said in Center Dot Character in macros:

                      @phaedrux This macro is about 150 pages long. I have levels of comments, some differentiated by a line of characters in a comment. Dash is already used for another comment level.

                      Now i'm curious to see the macro. 😵

                      Z-Bot CoreXY Build | Thingiverse Profile

                      DonStaufferundefined 2 Replies Last reply Reply Quote 0
                      • DonStaufferundefined
                        DonStauffer @Phaedrux
                        last edited by DonStauffer

                        @phaedrux Macro:

                        https://drive.google.com/file/d/1xkiiMbsnKcUBRHepfGuDxpLkeH_PS8OA/view?usp=sharing

                        1 Reply Last reply Reply Quote 1
                        • DonStaufferundefined
                          DonStauffer @Phaedrux
                          last edited by

                          @phaedrux The macro creates a few hundred short macros which support a system I developed to control printer settings on a feature level (solid fill, infill, supports, etc.) rather than just a layer level. So, you can set your outer perimeter to use a different fan setting than solid fill, for example.

                          Phaedruxundefined 1 Reply Last reply Reply Quote 2
                          • Phaedruxundefined
                            Phaedrux Moderator @DonStauffer
                            last edited by

                            @donstauffer said in Center Dot Character in macros:

                            I developed to control printer settings on a feature level (solid fill, infill, supports, etc.) rather than just a layer level.

                            That sounds amazing. That was the killer feature of the E3D slicer for me. Fine grained control over settings per feature.

                            Do you have any more details out there anywhere?

                            Z-Bot CoreXY Build | Thingiverse Profile

                            DonStaufferundefined 3 Replies Last reply Reply Quote 0
                            • DonStaufferundefined
                              DonStauffer @Phaedrux
                              last edited by DonStauffer

                              @phaedrux I just finished it the day before yesterday and the documentation isn't done yet. So this is really new. It's intended for use with Simplify3D but I think any slicer that has a Layer Change script and the ability to insert before each feature would work. I'll post something when I have it documented and maybe tested a little more.

                              As for the center dot, I distilled it down to this: In VBA, if you make a 2-character string with character codes 194 and 183, outputting it the usual way works:

                              Private Const CENTER_DOT_CHAR As String = "·"
                              or
                              Private Const CENTER_DOT_CHAR As String = Chr(194); Chr(183)

                              EDIT: The second one won't work unless you remove the "Const" and break it into a declaration and an assignment, I just realized.

                              Print #1, ";"; CENTER_DOT_CHAR

                              But you can't use the VBA String() function to duplicate it because it will only duplicate the first character of a string, so you have to use a loop. That's it.

                              1 Reply Last reply Reply Quote 0
                              • DonStaufferundefined
                                DonStauffer @Phaedrux
                                last edited by

                                @phaedrux This took me forever because it's been through several complete rewrites.

                                The concept is tested, but the latest rewrite is not yet, although I did go through the macro it generates and checked that it's doing what I wanted. So in theory, this should work. I'll post more information when I have updates.

                                There is a Word document with it. The first 4 pages of it are reasonably good. The rest is garbage that includes false starts at documentation and old stuff that has changed. But the first 4 pages should give you an idea what this does and how it works.

                                The guts is in the Excel spreadsheet in the form of a VBA macro that writes one HUGE GCode macro for you to upload to your printer and run. That macro creates all the other GCode macros which are needed.

                                https://drive.google.com/file/d/1Jh4fO95Y5pp5moa_8uJQQ0AG0cifJVMD/view?usp=sharing

                                oliofundefined 2 Replies Last reply Reply Quote 1
                                • oliofundefined
                                  oliof @DonStauffer
                                  last edited by

                                  @donstauffer this is great! Reminds me of some of the capabilities of FullControl and it's web based spiritual successor GCode Designer ...

                                  <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                                  1 Reply Last reply Reply Quote 0
                                  • oliofundefined
                                    oliof @DonStauffer
                                    last edited by

                                    @donstauffer that file with no file extension, what is it? I tried renaming it to .zip but that didn't work.

                                    <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                                    DonStaufferundefined 2 Replies Last reply Reply Quote 0
                                    • DonStaufferundefined
                                      DonStauffer @oliof
                                      last edited by DonStauffer

                                      @oliof I'm not sure. There are 4 files, and 2 of them are inside a folder named "Programs". Could it be the folder you're looking at?

                                      FeatureSettings.docx
                                      FeaturesSettings.xlsm

                                      Inside Programs folder:

                                      ReplaceWithQuotes.BAT
                                      sed-4.2.1-setup.exe

                                      All that is zipped up into FeatureSettings.zip. Security should be set to "anyone with link can view." So you should be able to get everything.

                                      1 Reply Last reply Reply Quote 0
                                      • DonStaufferundefined
                                        DonStauffer @oliof
                                        last edited by

                                        @oliof Maybe you were trying to look at the single file I uploaded a couple months ago. It's been deleted, but the Excel spreadsheet has a VBA macro called WriteMacros that will recreate it on your hard drive.

                                        oliofundefined 1 Reply Last reply Reply Quote 0
                                        • oliofundefined
                                          oliof @DonStauffer
                                          last edited by

                                          @donstauffer it worked now. No idea what Google Drive was up to.

                                          <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                                          1 Reply Last reply Reply Quote 0
                                          • DonStaufferundefined
                                            DonStauffer @Phaedrux
                                            last edited by

                                            @phaedrux Demo video.

                                            https://www.youtube.com/watch?v=NVjab77Dpgw

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA