Boxed Elevation Macro

Description of your first forum.

Boxed Elevation Macro

PostPosted by David S. » Sat Jul 02, 2016 12:54 am

I haven't posted on here in a long time, very busy right now, but has anyone come across a macro that will box out proposed elevations with a leader/arrow for my plot plans I prepare? I typically just RE a quick one using the right color each time but it gets a little time consuming and I am a stickler for getting the box centered on the figure, which is either 1 or 2 DV.
David S.
 
Posts: 25
Joined: Wed Jun 25, 2014 8:56 pm
Location: Largo, FL

Re: Boxed Elevation Macro

PostPosted by Bjorn Holmgren » Sat Jul 02, 2016 11:16 pm

If the elevation is a TL this gives you a box, trimmed to your preference.

;*** Bjorn Holmgren 2016
MO,/VLC;
;**************************************************************************
.SETTING BOX SIZE;
/VRL,0,0.25; Set as box size expansion from text size
;**************************************************************************
.EXECUTION;
/CEL,F,T,!,A,!,O,@,!;
/EEX,1,V,2,A,/VRL,1,$STR;
/EXT,E,1,2,L,!;
RE,$X(1)-$R(1)*$R(0),$Y(1)-$R(1)*$R(0),$X(2)+$R(1)*$R(0),$Y(2)+$R(1)*$R(0);
;**************************************************************************
Bjorn Holmgren
 
Posts: 51
Joined: Fri Jun 06, 2014 11:04 am
Location: Sunshine Coast QLD Australia

Re: Boxed Elevation Macro

PostPosted by David S. » Sun Jul 03, 2016 9:57 pm

Kinda like that but needs to connect to a leader though like this: https://www.dropbox.com/s/ggwk6gl0r7o2n ... S.jpg?dl=0
David S.
 
Posts: 25
Joined: Wed Jun 25, 2014 8:56 pm
Location: Largo, FL

Re: Boxed Elevation Macro

PostPosted by Bjorn Holmgren » Mon Jul 04, 2016 4:49 am

Leader added - pick elevation text first, then arrow point.
Using LE, so no polyline or curve for leader.

;*** TEXTBOXLEADER.GXM
;*** Bjorn Holmgren 2016
MO,/VLC;
;**************************************************************************
.SETTING BOX SIZE;
/VRL,0,0.25; Set as box size - perimeter expanded from text size
;**************************************************************************
.EXECUTION;
/CEL,F,T,!,A,!,O,@,!;
/EEX,1,V,2,A,/VRL,1,$STR;
/EXT,E,1,2,L,!;
.LEADER;
LL,!,/VRL,10,$VAL;
LD,@,#,/VPT,0,LP;
/VPT,10,$X(2)+$R(10)+$R(1)*$R(0),$Y(2)-($Y(2)-$Y(1))/2;
/IF,$X(0)[LT]$X(2)-($X(2)-$X(1))/2,/VPT,10,$X(1)-$R(10)-$R(1)*$R(0),$Y(2)-($Y(2)-$Y(1))/2;
RE,$X(1)-$R(1)*$R(0),$Y(1)-$R(1)*$R(0),$X(2)+$R(1)*$R(0),$Y(2)+$R(1)*$R(0);
LE,,$X(0),$Y(0),$X(10),$Y(10),$X(2),$Y(2);
;**************************************************************************L
Bjorn Holmgren
 
Posts: 51
Joined: Fri Jun 06, 2014 11:04 am
Location: Sunshine Coast QLD Australia

Re: Boxed Elevation Macro

PostPosted by Bjorn Holmgren » Thu Jul 07, 2016 9:36 am

The full macro as I see it.

;*** TEXTBOXLEADER.GXM
;*** Bjorn Holmgren 2016
/MSP,++,MO,/VLC;
;***********************************************************************************************
.SETTING BOX SIZE;
/VRL,0,0.25; Set as box size - perimeter expanded from text size
;***********************************************************************************************
.DIM SETTINGS;
/GET,dimlinecolor;
/VIN,1,$VAL;
/GET,dimlinewidth;
/VIN,2,$VAL;
LL,!,/VRL,10,$VAL;
.LINE SETTINGS;
LC,!,/VIN,11,$VAL;
LW,!,/VIN,12,$VAL;
;***********************************************************************************************
.BOX;
/PMT,2,#,/PMT,1,' Select [Text] to be boxed ... <ESC> to Exit ... <RET> To Undo Last ...',#;
/CEL,F,T,!,A,!,O,@,!;
/IF,$DERR[EQ]-2,/EXIT;
/IF,$DERR[EQ]-1,/IF,$I(0)[LE]0,/GTO,BOX;
/IF,$DERR[EQ]-1,OO,OO,/VIN,0,$I(0)-1,/GTO,BOX;
/EEX,1,V,2,A,/VRL,1,$STR;
/EXT,E,1,2,L,!;
.LEADER;
/PMT,1,' Select Text to be boxed ... <ESC> to Exit ..',#;
/PMT,2,' Pick Leader [Arrow Point] ... <ESC> to abort ..',#;
LD,@,#;
/IF,$DERR[EQ]-2,/GTO,BOX;
/VPT,0,LP;
/VPT,10,$X(2)+$R(10)+$R(1)*$R(0),$Y(2)-($Y(2)-$Y(1))/2;
/IF,$X(0)[LT]$X(2)-($X(2)-$X(1))/2,/VPT,10,$X(1)-$R(10)-$R(1)*$R(0),$Y(2)-($Y(2)-$Y(1))/2;
LC,$I(1),LW,$I(2);
RE,$X(1)-$R(1)*$R(0),$Y(1)-$R(1)*$R(0),$X(2)+$R(1)*$R(0),$Y(2)+$R(1)*$R(0);
LC,$I(11),LW,$I(12);
LE,,$X(0),$Y(0),$X(10),$Y(10),$X(2),$Y(2);
/VIN,0,$I(0)+1;
/GTO,BOX;
;***********************************************************************************************
Bjorn Holmgren
 
Posts: 51
Joined: Fri Jun 06, 2014 11:04 am
Location: Sunshine Coast QLD Australia


Return to General CADD Forum

Who is online

Users browsing this forum: No registered users and 0 guests

cron