Hammer.John.J
2010-02-09, 03:06 PM
I'm trying to get a command to work and it's from an older version of a licensed product but i'm missing a key part to make it work and need some help.
this is the lisp routine that i need, but i'm not sure how to get this CV_* stuff included to make it work
(SETVAR"cmdecho"0)
(SETQ OS(GETVAR"osmode"))
(SETVAR"osmode"0)
(SETQ DIST1(CV_XLATLSPGETDIST(CV_XLATLSPPHRASE 61902"Contour increment")"""ER"0 0 NIL))
(SETQ VAR2(CV_XLATLSPGETDIST(CV_XLATLSPPHRASE 61901"Grade")"""ER"0 1 NIL)VAR3(/(ABS VAR2)100.0)DIST(/ DIST1 VAR3))
(IF(< VAR2 0.0)(SETQ VAR1(- 0.0 DIST1))(SETQ VAR1 DIST1))
(WHILE(SETQ ENT1(ZZ_ENTSEL"AecCivilBase"0 0 NIL(CV_XLATLSPPHRASE 61904"Contour line to offset")NIL))(AEC_CONV_LW_TO_2D(CAR ENT1))(SETQ ENT(ENTGET(CAR ENT1)))(IF(OR(AND(=(CDR(ASSOC 0 ENT))"POLYLINE")(<(BOOLE 1 8(CDR(ASSOC 70 ENT)))8))(=(CDR(ASSOC 0 ENT))"LINE")(=(CDR(ASSOC 0 ENT))"ARC"))(PROGN(SETQ PT1(CV_XLATLSPGETCOORD(CV_XLATLSPPHRASE 61900"Side to offset")"""ER"0 1 NIL)PT2(CADR ENT1))(COMMAND"_.offset"DIST PT2 PT1"")(COMMAND"_.move""_l"""(quote (0.0 0.0 0.0))(APPEND(quote (0.0 0.0))(LIST VAR1))))(ZZ_MPROMPT"AecCivilBase"0(CV_XLATLSPIDFORSTRING 61903"\n2dpolyline, arc, or line not selected. \n")))(REDRAW(CAR ENT1)1))
(SETVAR"osmode"OS)
(SETQ PT1 NIL PT2 NIL ENT NIL ENT1 NIL DIST NIL DIST1 NIL VAR1 NIL VAR2 NIL VAR3 NIL)
(PRINC)
then i get:
nil
0
0
0
; error: no function definition: CV_XLATLSPPHRASE
_$
this is the lisp routine that i need, but i'm not sure how to get this CV_* stuff included to make it work
(SETVAR"cmdecho"0)
(SETQ OS(GETVAR"osmode"))
(SETVAR"osmode"0)
(SETQ DIST1(CV_XLATLSPGETDIST(CV_XLATLSPPHRASE 61902"Contour increment")"""ER"0 0 NIL))
(SETQ VAR2(CV_XLATLSPGETDIST(CV_XLATLSPPHRASE 61901"Grade")"""ER"0 1 NIL)VAR3(/(ABS VAR2)100.0)DIST(/ DIST1 VAR3))
(IF(< VAR2 0.0)(SETQ VAR1(- 0.0 DIST1))(SETQ VAR1 DIST1))
(WHILE(SETQ ENT1(ZZ_ENTSEL"AecCivilBase"0 0 NIL(CV_XLATLSPPHRASE 61904"Contour line to offset")NIL))(AEC_CONV_LW_TO_2D(CAR ENT1))(SETQ ENT(ENTGET(CAR ENT1)))(IF(OR(AND(=(CDR(ASSOC 0 ENT))"POLYLINE")(<(BOOLE 1 8(CDR(ASSOC 70 ENT)))8))(=(CDR(ASSOC 0 ENT))"LINE")(=(CDR(ASSOC 0 ENT))"ARC"))(PROGN(SETQ PT1(CV_XLATLSPGETCOORD(CV_XLATLSPPHRASE 61900"Side to offset")"""ER"0 1 NIL)PT2(CADR ENT1))(COMMAND"_.offset"DIST PT2 PT1"")(COMMAND"_.move""_l"""(quote (0.0 0.0 0.0))(APPEND(quote (0.0 0.0))(LIST VAR1))))(ZZ_MPROMPT"AecCivilBase"0(CV_XLATLSPIDFORSTRING 61903"\n2dpolyline, arc, or line not selected. \n")))(REDRAW(CAR ENT1)1))
(SETVAR"osmode"OS)
(SETQ PT1 NIL PT2 NIL ENT NIL ENT1 NIL DIST NIL DIST1 NIL VAR1 NIL VAR2 NIL VAR3 NIL)
(PRINC)
then i get:
nil
0
0
0
; error: no function definition: CV_XLATLSPPHRASE
_$