Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorQuenten
    • CommentTimeDec 25th 2017 edited
     
    I have the macro mtns, which I gleaned from somewhere ages ago, and it worked well until the Update 14. It now recognizes the command, but does nothing - it is supposed to come up with a dialogue. I use this often, especially for cliffs on big overland maps.
    Can anyone tell me why it doesn't work any longer.
    Here is the macro

    MACRO MTNS1
    ECOFF
    SELSAVE
    LWIDTH 0;LSTYLE solid;FSTYLE solid
    GOLAYER TMPMOUNTAINS
    GOLAYER TMPPATH
    GOLAYER MOUNTAINS
    SHEET MOUNTAINS
    ASKBOX DEFAULT VALUES
    Step 5
    Steep side length 5
    Smooth side length 10
    Color 0
    Line width 0
    IFERR Choose
    GO NoChoose
    :Choose
    GV RV 5
    GV RV ^DEnter step value (5)
    GV SL 5
    GV SL ^DEnter steep side length (5)
    GV SS 10
    GV SS ^DEnter smooth side length (10)
    GN CL 0
    GN CL ^DEnter color: (0)
    GV LW 0
    GV LW ^DEnter line width: (0)
    GO Selection
    :NoChoose
    GV RV 5
    GV SL 5
    GV SS 10
    GN CL 0
    Gv LW 0
    :Selection
    GE FL ^DSelect smooth line
    IFERR MacroDone
    COLOR CL
    SELBY1
    CHANGEL FL TMPMOUNTAINS
    GV RANDOM 1234
    LWIDTH LW
    GLEN LV FL
    GN LN LV/RV
    GV PSTEP 100/LN
    GV PRCV PSTEP
    GP P0 % 0 FL
    :DrawSide
    GV LFC (1-(PRCV-50)*(PRCV-50)*0.8/2500)
    IFN 100-PRCV-PSTEP/2 DrawBackBone
    GP P1 % PRCV FL
    GP P2 % PRCV+(PSTEP/100) FL
    GBRNG BR P1 P2
    GSIN RD1 RANDOM
    GV RANDOM RANDOM+200
    GSIN RD2 RANDOM
    GV RANDOM RANDOM+200
    GP P2 ref P1
    • CommentAuthorLoopysue
    • CommentTimeDec 26th 2017 edited
     
    Hi Quenten :)

    I don't tend to use many macros. Only the ones that are mentioned a lot publicly, like EDITSHADING, or FLIPSHADING (the later of which doesn't seem to be necessary any more since about update 13). Maybe the same thing has happened with this one (which I've not heard of before).

    I also remember that updates and re-installations can sometimes overwrite macros written by users (which is one of the reasons I don't tend to bother with them - too much to worry about when life is so busy). Maybe that is what has happened here? Maybe its been updated and given a slightly different name?

    One thing I'm guilty of.... well, two things actually, is that I haven't yet done update 14, and I don't tend to read the update notes all that thoroughly. Its like a blind spot of mine - looking at but not managing to take in a page of text...
    •  
      CommentAuthorQuenten
    • CommentTimeDec 26th 2017
     
    The macro isn't in any of the standard CC3+ stuff, it is one which has to be loaded when you need it. Never had a problem before.
    • CommentAuthorLoopysue
    • CommentTimeDec 26th 2017
     
    One that the user adds, then.

    Hmmmm... I assume its still physically there, or you wouldn't have been able to reproduce it above?
    •  
      CommentAuthorMonsen
    • CommentTimeDec 26th 2017
     
    Do you have the complete macro? The one above is missing several lines at the end, making it impossible to test properly.
    • CommentAuthorkathorus
    • CommentTimeDec 26th 2017
     
    Yeah, I put an ENDM at the end and was able to run it up to the "Select Smooth Line" command, where it bailed because I don't have the DrawBackBone command, which I assume is another macro.
    •  
      CommentAuthorQuenten
    • CommentTimeDec 26th 2017 edited
     
    I don't know why the text cut out at the end, even when I tried to edit it. Here it is as an attachment
    • CommentAuthorkathorus
    • CommentTimeDec 26th 2017
     
    Also, when I did get back the error on the DrawBackBone, I hadn't updated to 3.80, after updating and trying the full macro, I get nothing.
    •  
      CommentAuthorQuenten
    • CommentTimeDec 26th 2017
     
    Exactly - it worked perfectly with update 13, but not at all with update 14
    • CommentAuthorkathorus
    • CommentTimeDec 26th 2017
     
    I took off the ECOFF and SELSAVE from the beginning and the SELREST and ECON on the end and it runs again, but errors again on with the DrawBackBone function, it could be that I'm not running this on the correct type of entity.
    •  
      CommentAuthorMonsen
    • CommentTimeDec 26th 2017 edited
     
    As written, I couldn't go get that macro to work in any CC3+ version, I tried 3.80, 3.79, 3.77 and 3.74, with all of them showing the exact same behavior.

    But it works fine if you change the line
    Line width 0
    to
    Line width 0;

    The ; properly terminates the input to the askbox command, otherwise CC3+ doesn't know when the lines with text to put in the box ends and where the next command begins.

    (Note that when the macro crashes, it may mess up some settings, so make sure to restart CC3+, then issue the selbyd command to revert selection method to the normal one)
    •  
      CommentAuthorQuenten
    • CommentTimeDec 26th 2017
     
    Did all that - the :, the selbyd etc. No luck. And yet it worked perfectly before I upgraded to 3.80
    • CommentAuthorkathorus
    • CommentTimeDec 26th 2017
     
    I was able to run it with Monsen's fix.
    •  
      CommentAuthorMonsen
    • CommentTimeDec 26th 2017
     
    Then I don't know what is going on unfortunately. Adding the ; to properly terminate DRAWBOX input made it run perfectly for me (well, I assume perfectly, since I don't remember exactly how the output should look, but it does draw a bunch of fractal lines across the smooth path, which looks reasonable to me.)
    •  
      CommentAuthorQuenten
    • CommentTimeDec 26th 2017
     
    Interesting that you and kathorus have it running normally with 3.80, yet i still can't get it working. I'll post what I have in the macro revised again - just in case I 'corrected' the wrong thing
    • CommentAuthorkathorus
    • CommentTimeDec 26th 2017 edited
     
    Try this version.
  1.  
    Hi.

    This macro comes from here.

    The file works fine with update 14 on my computer.
    •  
      CommentAuthorQuenten
    • CommentTimeDec 26th 2017
     
    Yes, kathorus, yours works perfectly. I use this for cliffs a lot. And thanks to Joachim who designed it.