PDA

View Full Version : function definition: CV_XLATLSPPHRASE



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
_$

Ed Jobe
2010-02-09, 04:02 PM
It could be one of two things. You didn't state if you have the files that define the functions. If you don't, we can't supply them. Files that are part of a licensed program would be copyrighted. If you have them, you just have to make sure that the files have been loaded into autocad prior to running your code. Use the (load) function.

Hammer.John.J
2010-02-09, 04:28 PM
I do have the other codes, we have the proprietary info because we paid for the program (LDT). I guess I'm trying to figure out how i could find which one of the dozens of code it would be?

i found it in this lisp but i'm not sure if this is the right code, should i just load this and try it?
cv_init.lsp

or can you tell me if I should be looking for a lisp, vba, or some other operandus to make the thing work?

ccowgill
2010-02-09, 05:15 PM
I do have the other codes, we have the proprietary info because we paid for the program (LDT). I guess I'm trying to figure out how i could find which one of the dozens of code it would be?

i found it in this lisp but i'm not sure if this is the right code, should i just load this and try it?
cv_init.lsp

or can you tell me if I should be looking for a lisp, vba, or some other operandus to make the thing work?
well, I like using NotePad ++ to search for text within files, you could use that to see if it is defined elsewhere.