Internal Macro variables

Is there any access to "internal" values via the Macro language, for example, if I wanted to draw a horizontal line across my map at a certain point, is there a way to get the map height, width? Are there other variables exposed?

LINE (0, .33% Map Height) (Map Width, .33% Map Height)

Comments

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    You can get the map extents of the map through the GETEXTX and GETEXTY macro commands. you can assign the values from these to a variable, which you can then use as parameters for your command.

    Just be aware that these values will be based on the outermost points where entities exists, and not the visible/decorative map border. For most maps, this would probably end up being the white polygon on the SCREEN sheet.
  • kathoruskathorus Traveler
    Thanks Monsen, guess it would be better just to ask the user for input.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Depends what you want to do. I have a script I use for image exporting, and here I just have the user (that's me!) click the bottom left and top right corner. This was important to me, because I needed perfect precision, so GETEXTX didn't work for me, but if you can live with a bit of variation, then those commands are great.

    Also remember that you can store the results, so if you go the route of asking the user for something, you can only ask once, and then use the stored values thereafter. This is helpful if you do the same command multiple times in the same map.
  • kathoruskathorus Traveler
    I was thinking about things that would be based on the size of the map.

    For instance, a Key Box where the key would be placed in the lower right-hand corner and would be based on percentages of the H and W of the map, a border could be drawn, filled with a standard color, with guide lines on the inside based on the size of the box drawn to help with text placement, etc.... I figured since the size of the map has to be defined at creation, that perhaps there were variables or functions that returned that user input for macro consumption.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Posted By: kathorusI figured since the size of the map has to be defined at creation, that perhaps there were variables or functions that returned that user input for macro consumption.
    Unfortunately not. The size entered on creation is used to create map border entities of the correct size when the map is created, but the values aren't being kept. After creation, CC3+ relies on the map extents, which is the values you get from the commands I provided earlier.
Sign In or Register to comment.