Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Solution: Writing files, Nesting, Indentation, Comments

    Gcode meta commands
    1
    1
    65
    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.
    • DonStauffer
      DonStauffer last edited by DonStauffer

      Posting this in case it might be useful to someone.

      I've figured out a way to have macros write macros with:

      1. Any writing recursion depth (a macro writing a macro writing a macro writing a macro ... etc.)
      2. Control over comment propagation
      3. Preserved white space, including meta command indentation

      The simple explanation is, use M559 and give it the S parameter, using the number of characters including one line feed for each line. Since I'm writing the G-Code macros using VBA, my VBA code handles this calculation. I'd be happy to share my VBA code if anyone wants it. I'm really pretty excited about solving this.

      Here's my test example:

      GCode File Writing.jpg

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