New macro and lots of Qs
Joachim de Ravenbel
Surveyor
Hi,
I like my forest to be a simple outline of arcs as you can see here :
It saves ink, too
It works like that : draw a smooth poly, load macro, select smooth poly.
The macro makes use of % along, however I noticed that on a closed poly, the part connecting the last point to the first is not part of the % (ie you get 100% at the last point, before closing). It means the last point must be near the first...
I am full of questions too :
1) I would have liked to erase the smooth poly after completing (even tried to make it an option) but cannot managed
I tried to STORE the smooth poly an then ERASE SELECT to no avail. Any hint ?
2) I would also have liked to multipoly the arcs but how to select them in the macro ? Tried SELBC followed by the color #.
3) Is there a mean to access CC variables ? I wanted to store the linewidth to restore it after completing. Tried GV LW LWIDTH. Nope.
4) Arcs seem to respond badly to SHEET EFFECTS. I used the usual White GLOW on text but part of the text dissapeared (and yes, TEXT sheet was over FOREST sheet containing arcs).
Edit : wanted to paste the macro code but the text is cut...
Thanks for any answer or comment,
JdR
I like my forest to be a simple outline of arcs as you can see here :
It saves ink, too
It works like that : draw a smooth poly, load macro, select smooth poly.
The macro makes use of % along, however I noticed that on a closed poly, the part connecting the last point to the first is not part of the % (ie you get 100% at the last point, before closing). It means the last point must be near the first...
I am full of questions too :
1) I would have liked to erase the smooth poly after completing (even tried to make it an option) but cannot managed
I tried to STORE the smooth poly an then ERASE SELECT to no avail. Any hint ?
2) I would also have liked to multipoly the arcs but how to select them in the macro ? Tried SELBC followed by the color #.
3) Is there a mean to access CC variables ? I wanted to store the linewidth to restore it after completing. Tried GV LW LWIDTH. Nope.
4) Arcs seem to respond badly to SHEET EFFECTS. I used the usual White GLOW on text but part of the text dissapeared (and yes, TEXT sheet was over FOREST sheet containing arcs).
Edit : wanted to paste the macro code but the text is cut...
Thanks for any answer or comment,
JdR
Comments
MACRO FBRD
SELSAVE
LWIDTH 0;LSTYLE solid;FSTYLE solid
LAYER VEGETATION
SHEET FOREST
GV RV 10
GV RV ^DEnter step value (10)
GN CL 81
GN CL ^DEnter color: (81)
COLOR CL
GV LW 3
GV LW ^DEnter line width: (3)
GE BDR ^DSelect forest borderline
IFERR MacroDone
LWIDTH LW
GLEN LV BDR
GV PSTEP 100*RV/LV
GV PRCV1 0
GV PRCV2 PSTEP
:DrawArc
GP P1 % PRCV1 BDR
GP P2 % PRCV2 BDR
GBRNG BR P1 P2
ARCB P1 P2 ref P1 <BR-90,0.5*RV
GV PRCV1 PRCV1+PSTEP
GV PRCV2 PRCV1+PSTEP
IFP PRCV1-100 MacroDone
IFP 100-PRCV2 DrawArc
GV PRCV2 0
GO DrawArc
:MacroDone
SELREST
COLOR 0
ECON
ENDM
JdR
GV PRCV2 PRCV1+PSTEP
IFP PRCV1-100 MacroDone
IFP 100-PRCV2 DrawArc
GV PRCV2 0
GO DrawArc
:MacroDone
SELREST
COLOR 0
ECON
ENDM
(part 2/2)
JdR
Steve
But no quicks arousal though...
JdR
SELBYL
CHANGEL Temporary
At the end do
SLEBYL
ERASE Temporary Do the layer method, above. SELSAVE with save these settings, SELREST will get them back. I can't reproduce this. I've tried a white glow around arcs, and it looks OK. Point me at the fcw and I'll look.
3) Well, doesn't seem to work with line whidth, colors, fill syles and so on.
What I would like is to get all those parameters like they were before launching the macro.
You know, it's only because I'm lazy... and often forget to check the current mode...
4) Ha ! Cannot reproduce it either ! Everything seems now ok. Computer must have seen I have no hair left !
However, I made some modification since those troubles, added white smooth polygons under the text and now even with those hidden, everything's ok !
Perhaps the only thing I had to do was closing CC and opening again...
JdR
SKEEP -10000,10000
and it will extract the settings from the point.
By the way, is there a way to create arrayed variables such as P[1], P[2]... in a macro ?
Thanks,
JdR
So, you use append to attach the variable letter to the number, something like this:
MACRO ARRAY
GN index 1
:arrayloop
GW temparray A
APND temparray index
GW currentarray temparray
GV temp ^Dnumber?
IFERR endlable
GL comm GV
APND comm
APND comm currentarray
APND comm
APND comm temp
comm
GN index index+1
GO arrayloop
:endlable
ENDM
Note there is a space after each APND comm line. It works like this:
temparray is the array letter, index the number.
APND temparray index
Concatenates the number and letter (eg A1)
GW currentarray temparray
assigns the name of the current array variable to currentarray
GL comm GV
APND comm
APND comm currentarray
APND comm
APND comm temp
This lot builds up a command, comm, which looks like this
GV A1 temp
comm
runs that command. Don't build up commands with the ^D sequence - grab that data directly.
Opens new ways...
Thanks for all your feedbacks,
JdR
You must only add a space if you add real text, not if you add a variable... Cost me my last hairs, that...
For example :
GL comm TEXTM
APND comm_ ->space needed
APND comm LifeIsGood_ ->space needed
APND comm_
APND comm varPoint ->no space
if instead APND comm varPoint_ -> with space.
will yield : TEXTM LifeIsGood varPoint
APND comm ;_ didn't work though. Wonder, wonder...
Gave me a lot to think about...
JdR