This classic menu only support pulldown menu.
Come with - auto numbering, Align with line, Flatten, offset half distance , or quater distance,
Area and attribute block update.
Program as below :
copy and paste to simple.mnu file and load the file in AutoCAD or AutoCAD LT
Sim
sim@acadsystems.com
ACAD Systems Sdn Bhd
https://acadsystems.com
+6019-4125950
////////////////////////////////////////////////////////////////////////////
//
//
// ACADSYSTEMS (PENANG) SDN BHD tel:604-3992708 fax:604-3990708
//
// or email sim@acadsystems.com for details HP +6019-412-5950
//
///////////////////////////////////////////////////////////////////////////
//
// ; = enter in autocad
// \ = pick in autocad
// @ = alias or last pick point in autocad
// * = multiple in autocad
// ^C CANCEL
//
// $M= = convert to string
// $(*,34,5) = 34 * 5
// $(+,34,5) = 34 + 5
// $(-,34,5) = 34 - 5
// $(/,34,5) = 34 / 5
// $(getvar,distance) = get variable value of setvar distance from autocad
***menugroup=LT-SIMPLE1-menu
***pop1
[DT-sim-LTMENUr1]
[align-ref]^C^C_SELECT;AUTO;\_MOVE;P;;\\_ROTATE;P;;@;r;\
[align-dl]^C^Cline;\\;erase;l;;_SELECT;AUTO;\_MOVE;P;;\\_ROTATE;P;;@;$M=$(*,$(getvar,lastangle),57.272727);Redraw
[Offset 1/2 dist]^C^C_offset;'_dist;\\$m=$(/,$(getvar,distance),2);
[Offset 1/4 dist]^C^C_offset;'_dist;\\$m=$(/,$(getvar,distance),4);
[--]
[Transfer dist]'_dist;\\$m=$(eval,$(getvar,distance))^Z
[2012 - DELETE DUPLICATE ]^C^COVERKILL
[2012 - NCOPY -Copy objects in block]^c^cNCOPY
[2011 - CHSPACE convert inside viewport to layout object]^C^CCHSPACE
[--]
[Area -Bpoly- With text Area ]^C^C-BOUNDARY;\;CHANGE;L;;P;C;3;;m;L;;@;\LIST;L;;graphscr;+
Text;\0;$M=$(rtos,$(GETVAR,area),2,3);
[Area - Bpoly- With text Perimeter and Area ]^C^C-BOUNDARY;\;CHANGE;L;;P;C;3;;m;L;;@;\LIST;L;;graphscr;+
Text;\0;$M=$(rtos,$(GETVAR,perimeter),2,2);Text;\0;$M=$(rtos,$(GETVAR,AREA),2,3);
[FLATTEN -CONVERT TO 2D Z=0]^C^CUCS;;MOVE;ALL;;0,0,1E99;;MOVE;P;;0,0,-1E99;;
[--]
[CONTINUE PRE-TEXT NO FROM 1]^C^CSETVAR;MTJIGSTRING;\+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"1";+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"2";+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"3";+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"4";+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"5";+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"6";+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"7";+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"8";+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"9";+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)"10";
[CONTINUE PRE-TEXT FROM GIVEN NO WITH INCREMENT OF 1]^C^CSETVAR;MTJIGSTRING;\SETVAR;USERR1;\+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$(RTOS,$(+,$(GETVAR,USERR1),0),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),1),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),2),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),3),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),4),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),5),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),6),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),7),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),8),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),9),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),10),2,0);
[--]
[CONTINUE PRE-TEXT, START NO, AND INCREMENT]^C^CSETVAR;MTJIGSTRING;\SETVAR;USERR1;\SETVAR;USERR2;\+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$(RTOS,$(GETVAR,USERR1),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),1)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),2)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),3)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),4)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),5)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),6)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),7)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),8)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),9)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),10)),2,0);
[--]
[ ERASE OLD-TEXT, REPLACE PTR ERASE TEXT LOCATION]^C^CSETVAR;MTJIGSTRING;\SETVAR;USERR1;\SETVAR;USERR2;\+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$(RTOS,$(GETVAR,USERR1),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),1)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),2)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),3)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),4)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),5)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),6)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),7)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),8)),2,0);
[--]
[CONTINUE SUFFIX-TEXT START FROM NO 1]^C^CSETVAR;MTJIGSTRING;\+
TEXT;\0;1$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;2$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;"3"$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;"4"$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;"5"$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;"6"$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;"7"$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;"8"$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;"9"$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;"10"$M=$(GETVAR,MTJIGSTRING);
[CONTINUE SUFFIX-TEXT AND FROM GIVEN NO WITH INCREMENT OF 1]^C^CSETVAR;MTJIGSTRING;\SETVAR;USERR1;\+
TEXT;\0;$M=$(RTOS,$(GETVAR,USERR1),2,0)$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),1),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),2),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),3),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),4),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),5),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),6),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),7),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),8),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),9),2,0)$M=$(GETVAR,MTJIGSTRING);
[--]
[CONTINUE SUFFIX-TEXT,START NO, INCREMENT]^C^CSETVAR;MTJIGSTRING;\SETVAR;USERR1;\SETVAR;USERR2;\+
TEXT;\0;$M=$(RTOS,$(GETVAR,USERR1),2,0)$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),1)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),2)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),3)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),4)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),5)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),6)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),7)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),8)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),9)),2,0)$M=$(GETVAR,MTJIGSTRING);
[--]
[TEXT Continue for - a b c d e f g]^c^C+
TEXT;\0;a;TEXT;\0;b;TEXT;\0;c;TEXT;\0;d;TEXT;\0;e;TEXT;\0;f;TEXT;\0;g;TEXT;\0;h;+
TEXT;\0;i;TEXT;\0;j;TEXT;\0;k;TEXT;\0;l;TEXT;\0;m;TEXT;\0;n;TEXT;\0;o;TEXT;\0;p;+
TEXT;\0;q;TEXT;\0;r;TEXT;\0;s;TEXT;\0;t;TEXT;\0;u;TEXT;\0;v;TEXT;\0;w;TEXT;\0;x;+
TEXT;\0;y;TEXT;\0;z;TEXT;\0;A;TEXT;\0;B;TEXT;\0;C;
[TEXT Continue for - A B C D E F G]^c^C+
TEXT;\0;A;TEXT;\0;B;TEXT;\0;C;TEXT;\0;D;TEXT;\0;E;TEXT;\0;F;TEXT;\0;G;TEXT;\0;H;+
TEXT;\0;I;TEXT;\0;J;TEXT;\0;K;TEXT;\0;L;TEXT;\0;M;TEXT;\0;N;TEXT;\0;O;TEXT;\0;P;+
TEXT;\0;Q;TEXT;\0;R;TEXT;\0;A;TEXT;\0;T;TEXT;\0;U;TEXT;\0;V;TEXT;\0;W;TEXT;\0;X;+
TEXT;\0;Y;TEXT;\0;Z;TEXT;\0;A;TEXT;\0;B;TEXT;\0;C;
[--]
[TEXT PREFIX AND A B C -exp 22A 22B 22C 22D]^c^CSETVAR;MTJIGSTRING;\+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)A;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)B;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)C;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)D;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)E;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)F;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)G;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)H;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)I;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)J;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)K;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)L;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)M;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)N;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)O;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)P;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)Q;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)R;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)S;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)T;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)U;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)V;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)W;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)X;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)Y;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)Z;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)A;
[TEXT SUFFIX AND A B C -exp A22 B22 C22 D22]^c^CSETVAR;MTJIGSTRING;\+
TEXT;\0;A$M=$(GETVAR,MTJIGSTRING);TEXT;\0;B$M=$(GETVAR,MTJIGSTRING);TEXT;\0;C$(GETVAR,MTJIGSTRING);+
TEXT;\0;D$(GETVAR,MTJIGSTRING);TEXT;\0;E$(GETVAR,MTJIGSTRING);TEXT;\0;F$(GETVAR,MTJIGSTRING);+
TEXT;\0;G$(GETVAR,MTJIGSTRING);TEXT;\0;H$(GETVAR,MTJIGSTRING);TEXT;\0;I$(GETVAR,MTJIGSTRING);+
TEXT;\0;J$(GETVAR,MTJIGSTRING);TEXT;\0;K$(GETVAR,MTJIGSTRING);TEXT;\0;L$(GETVAR,MTJIGSTRING);+
TEXT;\0;M$(GETVAR,MTJIGSTRING);TEXT;\0;N$(GETVAR,MTJIGSTRING);TEXT;\0;O$(GETVAR,MTJIGSTRING);+
TEXT;\0;P$(GETVAR,MTJIGSTRING);TEXT;\0;Q$(GETVAR,MTJIGSTRING);TEXT;\0;R$(GETVAR,MTJIGSTRING);+
TEXT;\0;S$(GETVAR,MTJIGSTRING);TEXT;\0;T$(GETVAR,MTJIGSTRING);TEXT;\0;U$(GETVAR,MTJIGSTRING);+
TEXT;\0;V$(GETVAR,MTJIGSTRING);TEXT;\0;W$(GETVAR,MTJIGSTRING);TEXT;\0;X$(GETVAR,MTJIGSTRING);+
TEXT;\0;Y$(GETVAR,MTJIGSTRING);TEXT;\0;Z$(GETVAR,MTJIGSTRING);TEXT;\0;A$(GETVAR,MTJIGSTRING);
[--]
[CHANGE BLOCK DATA -TAG +SEL_BLOCK +OLD_VALUE +NEW_VALUE]^C^CATTE;N;Y;*;\*;
[CHANGE BLOCK DATA -BLOCKNAME +TAG +SEL_BLOCK +OLD_VALUE +NEW_VALUE]^C^CATTE;N;Y;\\*;
***pop501
[DT-simx501]
[align-dl]^C^Cline;\\;erase;l;;_SELECT;AUTO;\_MOVE;P;;\\_ROTATE;P;;@;$M=$(*,$(getvar,lastangle),57.272727);Redraw
[Offset 1/2 dist]^C^C_offset;'_dist;\\$m=$(/,$(getvar,distance),2);
[Offset 1/4 dist]^C^C_offset;'_dist;\\$m=$(/,$(getvar,distance),4);
[Transfer dist]'_dist;\\$m=$(eval,$(getvar,distance))^Z
[2012 - DELETE DUPLICATE ]^C^COVERKILL
[2012 - NCOPY -Copy objects in block]^c^cNCOPY
[Area -Bpoly- With text Area ]^C^C-BOUNDARY;\;CHANGE;L;;P;C;3;;m;L;;@;\LIST;L;;graphscr;Text;\0;$M=$(rtos,$(GETVAR,area),2,3);
[Area - Bpoly- With text Perimeter and Area ]^C^C-BOUNDARY;\;CHANGE;L;;P;C;3;;m;L;;@;\LIST;L;;graphscr;+
Text;\0;$M=$(rtos,$(GETVAR,perimeter),2,2);Text;\0;$M=$(rtos,$(GETVAR,AREA),2,3);
[--]
[FLATTEN -CONVERT TO 2D Z=0]^C^CUCS;;MOVE;ALL;;0,0,1E99;;MOVE;P;;0,0,-1E99;;
***pop502
[DT-simx502]
[CONTINUE PRE-TEXT, START NO, AND INCREMENT]^C^CSETVAR;MTJIGSTRING;\SETVAR;USERR1;\SETVAR;USERR2;\+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$(RTOS,$(GETVAR,USERR1),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),1)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),2)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),3)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),4)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),5)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),6)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),7)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),8)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),9)),2,0);+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),10)),2,0);
[--]
[ ERASE OLD-TEXT, REPLACE PTR ERASE TEXT LOCATION]^C^CSETVAR;MTJIGSTRING;\SETVAR;USERR1;\SETVAR;USERR2;\+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$(RTOS,$(GETVAR,USERR1),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),1)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),2)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),3)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),4)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),5)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),6)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),7)),2,0);+
ERASE;\;TEXT;@;0;$M=$(GETVAR,MTJIGSTRING)$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),8)),2,0);
[--]
[CONTINUE SUFFIX-TEXT,START NO, INCREMENT]^C^CSETVAR;MTJIGSTRING;\SETVAR;USERR1;\SETVAR;USERR2;\+
TEXT;\0;$M=$(RTOS,$(GETVAR,USERR1),2,0)$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),1)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),2)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),3)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),4)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),5)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),6)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),7)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),8)),2,0)$M=$(GETVAR,MTJIGSTRING);+
TEXT;\0;$M=$(RTOS,$(+,$(GETVAR,USERR1),$(*,$(GETVAR,USERR2),9)),2,0)$M=$(GETVAR,MTJIGSTRING);
[--]
[TEXT PREFIX AND A B C -exp 22A 22B 22C 22D]^c^CSETVAR;MTJIGSTRING;\+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)A;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)B;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)C;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)D;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)E;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)F;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)G;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)H;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)I;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)J;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)K;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)L;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)M;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)N;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)O;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)P;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)Q;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)R;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)S;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)T;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)U;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)V;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)W;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)X;+
TEXT;\0;$M=$(GETVAR,MTJIGSTRING)Y;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)Z;TEXT;\0;$M=$(GETVAR,MTJIGSTRING)A;
[TEXT SUFFIX AND A B C -exp A22 B22 C22 D22]^c^CSETVAR;MTJIGSTRING;\+
TEXT;\0;A$M=$(GETVAR,MTJIGSTRING);TEXT;\0;B$M=$(GETVAR,MTJIGSTRING);TEXT;\0;C$(GETVAR,MTJIGSTRING);+
TEXT;\0;D$(GETVAR,MTJIGSTRING);TEXT;\0;E$(GETVAR,MTJIGSTRING);TEXT;\0;F$(GETVAR,MTJIGSTRING);+
TEXT;\0;G$(GETVAR,MTJIGSTRING);TEXT;\0;H$(GETVAR,MTJIGSTRING);TEXT;\0;I$(GETVAR,MTJIGSTRING);+
TEXT;\0;J$(GETVAR,MTJIGSTRING);TEXT;\0;K$(GETVAR,MTJIGSTRING);TEXT;\0;L$(GETVAR,MTJIGSTRING);+
TEXT;\0;M$(GETVAR,MTJIGSTRING);TEXT;\0;N$(GETVAR,MTJIGSTRING);TEXT;\0;O$(GETVAR,MTJIGSTRING);+
TEXT;\0;P$(GETVAR,MTJIGSTRING);TEXT;\0;Q$(GETVAR,MTJIGSTRING);TEXT;\0;R$(GETVAR,MTJIGSTRING);+
TEXT;\0;S$(GETVAR,MTJIGSTRING);TEXT;\0;T$(GETVAR,MTJIGSTRING);TEXT;\0;U$(GETVAR,MTJIGSTRING);+
TEXT;\0;V$(GETVAR,MTJIGSTRING);TEXT;\0;W$(GETVAR,MTJIGSTRING);TEXT;\0;X$(GETVAR,MTJIGSTRING);+
TEXT;\0;Y$(GETVAR,MTJIGSTRING);TEXT;\0;Z$(GETVAR,MTJIGSTRING);TEXT;\0;A$(GETVAR,MTJIGSTRING);
Collection of Autolisp programs and AutoCAD menu customization tools tips and tricks
Sunday, 12 April 2015
Selection by object - endpoint to endpoint.
By Sim
sim@acadsystems.com
ACAD Systems Sdn Bhd
https://acadsystems.com
+6019-4125950
;; Command for autoselect endpoint to endpoint
;; Command in autocad is CXX4
;; selected object put in variable = !ggg4
;;
;;usefull in CIVIL - select joining line for bearing distance.
;; only support line and arc
;;lisp program below :
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Select by pick one object that found nes in sequence
;; global variable ggg4 - used !ggg4
(DEFUN C:Cxx4 (/ cclayer cccolor p1 p2 p3 p4 p5 pp1 pp2
pp3 mm1 mm2 mm3 ap1 ap2 ap2 lp1 lp2 lp3 cc ptlist
ptxlist aa m1 cc ent1 nx nx1 nn pttlist sent ss1
)
(defun gentt (aax / a1 dd p1 p2 p3)
(setq dd (entget aax))
(setq a1 (cdr (assoc 0 dd)))
(setq p1 a1)
;(princ p1)
)
(defun ppline (aax / a1 dd p1 p2 p3)
(setq dd (entget aax))
(setq a1 (cdr (assoc 10 dd)))
(setq p1 a1)
(setq a1 (cdr (assoc 11 dd)))
(setq p2 a1)
(setq p3 (list p1 p2))
; (princ p3)
)
(defun pparc (aax / a1 arade arads arad dd p1 p2 p3)
(setq dd (entget aax)) (setq a1 (cdr (assoc 10 dd)))
(setq arad (cdr (assoc 40 dd))) (setq arads (cdr (assoc 50 dd)))
(setq arade (cdr (assoc 51 dd))) (setq p1 (polar a1 arads arad))
(setq p2 (polar a1 arade arad)) (setq p3 (list p1 p2)) ;(princ p3)
)
(defun cgotp (aap1 plist / rr1 rr nn cc p1 p2 p3 p4 d1 d0)
(setq nn 0 rr "0" )
(while (setq p1 (nth nn plist))
(setq d1 (distance aap1 p1))
(if (< d1 0.0001)
(progn (setq nn 1000) (setq rr "1") ) ) (setq nn (+ nn 1))
) ;
;(princ rr)
(setq rr1 rr)
) ;end cgotp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq ggmode (getvar "osmode")) (setq gglayer (getvar "CLAYER"))
;;;SET OSNAP TO 0 FIRST...
(setvar "osmode" 0)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq m1 (ssadd)) (setq Mm1 (ssadd)) (setq cclayer "0")
(setq cc "1") ;(while (= cc "1")
;;;reset master selection
(setq m1 nil) (setq m1 (ssadd)) (setq ptlist nil) (setq ptxlist nil) (setq pttlist nil) (setq mm1 nil) (setq mm1 (ssadd))
(setq aa (entsel "\n Pick object line or arc only noted : support line and arc joining endpoint only : "))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(if (= aa nil)
(progn (setq cc "0") (princ "\n No object selected..exit") (setvar "osmode" ggmode) (setvar "cmdecho" 1) (princ "\n Exit...") (exit)
)
(progn (princ "\n Process find joining selection....") (setq cc "1") (setq aa (car aa)) (setq m1 (ssadd aa m1))
(setq ent1 (gentt aa))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;for first entity
(if (= ent1 "LINE")
(progn (setq mm1 (ssadd aa mm1)) (setq p1 (car (ppline aa))) (setq p2 (cadr (ppline aa))) (setq ptlist (append (list p1) ptlist))
(setq ptlist (append (list p2) ptlist)) (setq pttlist (append (list p1) pttlist)) (setq pttlist (append (list p2) pttlist)) ) ;end line progn
) ;end line
(if (= ent1 "ARC")
(progn
(setq cc "0") (setvar "osmode" ggmode) (princ "\n Pocket select is ARC ..." ) (setq p1 (car (pparc aa))) (setq p2 (cadr (pparc aa)))
(setq ptlist (append (list p1) ptlist)) (setq ptlist (append (list p2) ptlist)) ) ;end line progn
) ;end arc
(if (/= ent1 "LINE")
(progn (princ "\n object selected not a line") (if (/= ENT1 "ARC") (progn (princ "\n Object selected not LINE or ARC...exit") (exit)
) ) ) );
sim@acadsystems.com
ACAD Systems Sdn Bhd
https://acadsystems.com
+6019-4125950
;; Command for autoselect endpoint to endpoint
;; Command in autocad is CXX4
;; selected object put in variable = !ggg4
;;
;;usefull in CIVIL - select joining line for bearing distance.
;; only support line and arc
;;lisp program below :
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Select by pick one object that found nes in sequence
;; global variable ggg4 - used !ggg4
(DEFUN C:Cxx4 (/ cclayer cccolor p1 p2 p3 p4 p5 pp1 pp2
pp3 mm1 mm2 mm3 ap1 ap2 ap2 lp1 lp2 lp3 cc ptlist
ptxlist aa m1 cc ent1 nx nx1 nn pttlist sent ss1
)
(defun gentt (aax / a1 dd p1 p2 p3)
(setq dd (entget aax))
(setq a1 (cdr (assoc 0 dd)))
(setq p1 a1)
;(princ p1)
)
(defun ppline (aax / a1 dd p1 p2 p3)
(setq dd (entget aax))
(setq a1 (cdr (assoc 10 dd)))
(setq p1 a1)
(setq a1 (cdr (assoc 11 dd)))
(setq p2 a1)
(setq p3 (list p1 p2))
; (princ p3)
)
(defun pparc (aax / a1 arade arads arad dd p1 p2 p3)
(setq dd (entget aax)) (setq a1 (cdr (assoc 10 dd)))
(setq arad (cdr (assoc 40 dd))) (setq arads (cdr (assoc 50 dd)))
(setq arade (cdr (assoc 51 dd))) (setq p1 (polar a1 arads arad))
(setq p2 (polar a1 arade arad)) (setq p3 (list p1 p2)) ;(princ p3)
)
(defun cgotp (aap1 plist / rr1 rr nn cc p1 p2 p3 p4 d1 d0)
(setq nn 0 rr "0" )
(while (setq p1 (nth nn plist))
(setq d1 (distance aap1 p1))
(if (< d1 0.0001)
(progn (setq nn 1000) (setq rr "1") ) ) (setq nn (+ nn 1))
) ;
;(princ rr)
(setq rr1 rr)
) ;end cgotp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq ggmode (getvar "osmode")) (setq gglayer (getvar "CLAYER"))
;;;SET OSNAP TO 0 FIRST...
(setvar "osmode" 0)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq m1 (ssadd)) (setq Mm1 (ssadd)) (setq cclayer "0")
(setq cc "1") ;(while (= cc "1")
;;;reset master selection
(setq m1 nil) (setq m1 (ssadd)) (setq ptlist nil) (setq ptxlist nil) (setq pttlist nil) (setq mm1 nil) (setq mm1 (ssadd))
(setq aa (entsel "\n Pick object line or arc only noted : support line and arc joining endpoint only : "))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(if (= aa nil)
(progn (setq cc "0") (princ "\n No object selected..exit") (setvar "osmode" ggmode) (setvar "cmdecho" 1) (princ "\n Exit...") (exit)
)
(progn (princ "\n Process find joining selection....") (setq cc "1") (setq aa (car aa)) (setq m1 (ssadd aa m1))
(setq ent1 (gentt aa))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;for first entity
(if (= ent1 "LINE")
(progn (setq mm1 (ssadd aa mm1)) (setq p1 (car (ppline aa))) (setq p2 (cadr (ppline aa))) (setq ptlist (append (list p1) ptlist))
(setq ptlist (append (list p2) ptlist)) (setq pttlist (append (list p1) pttlist)) (setq pttlist (append (list p2) pttlist)) ) ;end line progn
) ;end line
(if (= ent1 "ARC")
(progn
(setq cc "0") (setvar "osmode" ggmode) (princ "\n Pocket select is ARC ..." ) (setq p1 (car (pparc aa))) (setq p2 (cadr (pparc aa)))
(setq ptlist (append (list p1) ptlist)) (setq ptlist (append (list p2) ptlist)) ) ;end line progn
) ;end arc
(if (/= ent1 "LINE")
(progn (princ "\n object selected not a line") (if (/= ENT1 "ARC") (progn (princ "\n Object selected not LINE or ARC...exit") (exit)
) ) ) );
(setq gp1 p1 gp2 p2) ;;end for first entity ;(princ ptlist)
(princ "\n continue next entity..")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;select other entity to join ...auto....from Gp1... then from Gp2
(setq nx 0)
(while (setq p1 (nth nx ptlist))
(setq ptxlist nil) (setq p1a (polar p1 0.78 0.1)) (setq p1b (polar p1 3.9 0.1)) (command "zoom" "c" p1 "10") (setq ss1 nil)
(setq ss1 (ssget "C" p1a p1b (list (cons 0 "LINE,ARC")))) (command "zoom" "p")
(if (= ss1 nil)
(progn (princ "\n Make sure set ucs to world and now program autoset ucs to world .. rerun the program..") (command "ucs" "w") (exit) )
);end ss1 =nil
(setq nx1 0)
(while (setq dd2 (ssname ss1 nx1))
(if (= dd2 (ssmemb dd2 m1)) (progn ;;member dun need to do...skip
(princ "member skip") )
(progn ;; not member need to check meet member spec...if yes add to member m1
;; if not skip dun process the object.
(setq ent1 (gentt dd2))
(if (= ent1 "LINE")
(progn (setq p1 (car (ppline dd2))) (setq p2 (cadr (ppline dd2)))
(if (or (= (cgotp p1 ptlist) "1") (= (cgotp p2 ptlist) "1") )
(progn
;;;;found point meet spec. and condition...move entity to m1 also added p1 or p2 to ptlist
(setq m1 (ssadd dd2 m1)) (setq mm1 (ssadd dd2 mm1))
(if (/= (cgotp p1 ptlist) "1")
(progn (setq ptlist (append (list p1) ptlist)) (setq ptxlist (append (list p1) ptxlist)) (setq pttlist (append (list p1) pttlist)) )
) ;end if
(if (/= (cgotp p2 ptlist) "1")
(progn (setq ptlist (append (list p2) ptlist)) (setq ptxlist (append (list p2) ptxlist)) (setq pttlist (append (list p2) pttlist)) )
) ;end if
)
(progn (princ "entity line not the member ") ) ) ) ;end line progn
) ;end line
(if (= ent1 "ARC")
(progn (setq p1 (car (pparc dd2))) (setq p2 (cadr (pparc dd2))) (if (or (= (cgotp p1 ptlist) "1") (= (cgotp p2 ptlist) "1") )
(progn
;;;;found point meet spec. and condition...move entity to m1 also added p1 or p2 to ptlist
;(print "\n Found arc entity")
(setq m1 (ssadd dd2 m1))
(if (/= (cgotp p1 ptlist) "1")
(progn
(setq ptlist (append (list p1) ptlist)) (setq ptxlist (append (list p1) ptxlist)) )
) ;end if
(if (/= (cgotp p2 ptlist) "1")
(progn
(setq ptlist (append (list p2) ptlist)) (setq ptxlist (append (list p2) ptxlist)) )
) ;end if
)
(progn
(princ "entity arc not the member ") ) ) ) ;end arc progn
) ;end arc
) ;end progn
) ;end if dd2
(setq nx1 (+ nx1 1)) ) ;end while nx1
(if (/= ptxlist nil) (setq nx -1) )
(setq nx (+ nx 1))
) ;end while nx
) ;end progn aa
) ;end if aa
;(command "change" m1 "" "p" "la" cclayer "c" cccolor "")
(setq Ggg4 m1)
;;;;;change line entity sequence
(setq nn 0)
(while (setq dd3 (ssname mm1 nn)) (setq nn (+ nn 1))
;(command "change" dd3 "" "p" "c" nn "")
) ;end while
;;;put no on point for line only
(setq nn 0) (setq ptlist (reverse ptlist))
(while (setq dd3 (nth nn ptlist))
(setq nn (+ nn 1)) ; (command "text" "j" "m" dd3 "0" nn "")
) ;end while
;(command "erase" m1 "");;;reset all the point and lisp
(setq p1 nil p2 nil p3 nil mm1 nil m2 nil m3 Nil ap1 nil ap2 nil ptlist nil AA NIL pttlist nil ptxlist nil nn nil)
;;;;; ) ;end while cc
(alert " Type !ggg4 to place the selection object..")
) ;end defun cxx4 select4 lines in sequencee
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(princ "\n continue next entity..")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;select other entity to join ...auto....from Gp1... then from Gp2
(setq nx 0)
(while (setq p1 (nth nx ptlist))
(setq ptxlist nil) (setq p1a (polar p1 0.78 0.1)) (setq p1b (polar p1 3.9 0.1)) (command "zoom" "c" p1 "10") (setq ss1 nil)
(setq ss1 (ssget "C" p1a p1b (list (cons 0 "LINE,ARC")))) (command "zoom" "p")
(if (= ss1 nil)
(progn (princ "\n Make sure set ucs to world and now program autoset ucs to world .. rerun the program..") (command "ucs" "w") (exit) )
);end ss1 =nil
(setq nx1 0)
(while (setq dd2 (ssname ss1 nx1))
(if (= dd2 (ssmemb dd2 m1)) (progn ;;member dun need to do...skip
(princ "member skip") )
(progn ;; not member need to check meet member spec...if yes add to member m1
;; if not skip dun process the object.
(setq ent1 (gentt dd2))
(if (= ent1 "LINE")
(progn (setq p1 (car (ppline dd2))) (setq p2 (cadr (ppline dd2)))
(if (or (= (cgotp p1 ptlist) "1") (= (cgotp p2 ptlist) "1") )
(progn
;;;;found point meet spec. and condition...move entity to m1 also added p1 or p2 to ptlist
(setq m1 (ssadd dd2 m1)) (setq mm1 (ssadd dd2 mm1))
(if (/= (cgotp p1 ptlist) "1")
(progn (setq ptlist (append (list p1) ptlist)) (setq ptxlist (append (list p1) ptxlist)) (setq pttlist (append (list p1) pttlist)) )
) ;end if
(if (/= (cgotp p2 ptlist) "1")
(progn (setq ptlist (append (list p2) ptlist)) (setq ptxlist (append (list p2) ptxlist)) (setq pttlist (append (list p2) pttlist)) )
) ;end if
)
(progn (princ "entity line not the member ") ) ) ) ;end line progn
) ;end line
(if (= ent1 "ARC")
(progn (setq p1 (car (pparc dd2))) (setq p2 (cadr (pparc dd2))) (if (or (= (cgotp p1 ptlist) "1") (= (cgotp p2 ptlist) "1") )
(progn
;;;;found point meet spec. and condition...move entity to m1 also added p1 or p2 to ptlist
;(print "\n Found arc entity")
(setq m1 (ssadd dd2 m1))
(if (/= (cgotp p1 ptlist) "1")
(progn
(setq ptlist (append (list p1) ptlist)) (setq ptxlist (append (list p1) ptxlist)) )
) ;end if
(if (/= (cgotp p2 ptlist) "1")
(progn
(setq ptlist (append (list p2) ptlist)) (setq ptxlist (append (list p2) ptxlist)) )
) ;end if
)
(progn
(princ "entity arc not the member ") ) ) ) ;end arc progn
) ;end arc
) ;end progn
) ;end if dd2
(setq nx1 (+ nx1 1)) ) ;end while nx1
(if (/= ptxlist nil) (setq nx -1) )
(setq nx (+ nx 1))
) ;end while nx
) ;end progn aa
) ;end if aa
;(command "change" m1 "" "p" "la" cclayer "c" cccolor "")
(setq Ggg4 m1)
;;;;;change line entity sequence
(setq nn 0)
(while (setq dd3 (ssname mm1 nn)) (setq nn (+ nn 1))
;(command "change" dd3 "" "p" "c" nn "")
) ;end while
;;;put no on point for line only
(setq nn 0) (setq ptlist (reverse ptlist))
(while (setq dd3 (nth nn ptlist))
(setq nn (+ nn 1)) ; (command "text" "j" "m" dd3 "0" nn "")
) ;end while
;(command "erase" m1 "");;;reset all the point and lisp
(setq p1 nil p2 nil p3 nil mm1 nil m2 nil m3 Nil ap1 nil ap2 nil ptlist nil AA NIL pttlist nil ptxlist nil nn nil)
;;;;; ) ;end while cc
(alert " Type !ggg4 to place the selection object..")
) ;end defun cxx4 select4 lines in sequencee
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Subscribe to:
Posts (Atom)
ACADSYS BONUS TOOLS 2025 for AutoCAD 2025 and AutoCAD LT 2025 only version 2025.99.03 (25-11-2024)
This is the add-on AutoLISP routine for AutoCAD 2025 and LT2025 above, a collection of design tools can be found here. Enjoy. ACADSYS Bo...
-
This is a special menu for AutoCAD (and AutoCAD LT 2024 only) users that allows them to place a continuing number, a trace boundary, the are...
-
Importing Points from Excel to AutoCAD/LT Using a SCRIPT File How can I input X and Y coordinates into AutoCAD and create a SCRIPT file to p...
-
Command included makehatch and savehatch. Lisp file was modified to make it works...but run slower.. hatchmaker lisp file 'Note : ...