Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Quick Profile Lisp Help

6 REPLIES 6
Reply
Message 1 of 7
ArchD
4073 Views, 6 Replies

Quick Profile Lisp Help

I have a lisp that cuts cross section profiles of polylines. Once in a while I get this error, and I have no idea why. I do everything the same as normal, but it happens now and again and I can't find any resolution, even if I draw another polyline right next to the one that gives me the error, and I get the same error on that one, even if I draw the line starting from both ends.

Here is the lsp:

{code}
;;;Author: Pedro Miguel da Silva Ferreira Email:pedro_ferreira@netcabo.pt or pferreira@wsatkins.pt
;;;Web page: http:pwp.netcabo.pt/pedro_ferreira
;;;Location: Portugal, Lisboa
;;;RDS: PMSF
;;;Command Name: qp
;;;Date: 09 of May 2006
;;;Version: 1.0
;;;Description: Visual Lisp Routine that creates a section profile of the terrain based on the existing contours.



(defun timeini ()
(setq s (getvar "DATE"))
(setq seconds (* 86400.0 (- s (fix s))))
)

(defun timeend ()
(setq s1 (getvar "DATE"))
(setq seconds1 (* 86400.0 (- s1 (fix s1))))
(setq seconds2 (fix (- seconds1 seconds)))
(princ
(strcat "\nTime : "
(itoa seconds2)
" seconds"
)
)
)

(defun inivar ()
(setq cmd_ini (getvar "cmdecho")
fla_ini (getvar "flatland")
osm_ini (getvar "osmode")
ort_ini (getvar "orthomode")
plt_ini (getvar "plinetype")
aup_ini (getvar "auprec")
uni_ini (getvar "unitmode")
lun_ini (getvar "lunits")
diz_ini (getvar "dimzin")
edg_ini (getvar "edgemode")
)
(setvar "CMDECHO" 0)
(setvar "FLATLAND" 0)
(setvar "OSMODE" 0)
(setvar "ORTHOMODE" 0)
(setvar "PLINETYPE" 2)
(setvar "AUPREC" 0)
(setvar "UNITMODE" 1)
(setvar "LUNITS" 2)
(setvar "DIMZIN" 0)
(setvar "EDGEMODE" 1)
)

(defun recvar ()
(setvar "CMDECHO" cmd_ini)
(setvar "FLATLAND" fla_ini)
(setvar "OSMODE" osm_ini)
(setvar "ORTHOMODE" ort_ini)
(setvar "PLINETYPE" plt_ini)
(setvar "AUPREC" aup_ini)
(setvar "UNITMODE" uni_ini)
(setvar "LUNITS" lun_ini)
(setvar "DIMZIN" diz_ini)
(setvar "EDGEMODE" edg_ini)
)

(defun getlayname ()
(setq contourstest nil)
(setq layername
(getstring
"\nPlease enter the layer name of the contours: "
)
)
(setq contourstest
(ssget "_x"
(list (cons -4 " (cons -4 " (cons 0 "lwpolyline")
(cons 8 layername)
(cons -4 "AND>")
(cons -4 " (cons 0 "polyline")
(cons 8 layername)
(cons -4 "AND>")
(cons -4 " (cons 0 "line")
(cons 8 layername)
(cons -4 "AND>")
(cons -4 " (cons 0 "spline")
(cons 8 layername)
(cons -4 "AND>")
(cons -4 "OR>")
)
)
)

(while (= contourstest nil)
(princ "\nNo contours selected...")
(setq layername
(getstring
"\nPlease enter the layer name of the contours: "
)
)
(setq contourstest
(ssget "_x"
(list (cons -4 " (cons -4 " (cons 0 "lwpolyline")
(cons 8 layername)
(cons -4 "AND>")
(cons -4 " (cons 0 "polyline")
(cons 8 layername)
(cons -4 "AND>")
(cons -4 " (cons 0 "line")
(cons 8 layername)
(cons -4 "AND>")
(cons -4 " (cons 0 "spline")
(cons 8 layername)
(cons -4 "AND>")
(cons -4 "OR>")
)
)
)
)
)

(defun activexsupport ()
(vl-load-com)
(setq *modelspace*
(vla-get-modelspace
(vla-get-activedocument (vlax-get-acad-object))
)
)
)

(defun esttexto ()

(vl-cmdf "._style" "PMSF-TEXT" "romans" 2.50 0.80 0 "n" "n" "n")
)

(defun getha ()
;; this entity must be a lwpolyline
(activexsupport)
(setq
ha (entsel "\nSelect the Horizontal alignment: ")
)
(while (= ha nil)
(progn
(princ "\nNothing selected...")
(setq ha
(entsel "\nSelect the Horizontal alignment: ")
)
)
)
(setq ha-type (cdr (assoc 0 (entget (car ha)))))
(if (not (equal ha-type "LWPOLYLINE"))
(progn
(setq ha nil)
(princ "\n***Horizontal Alignment must be a LWPolyline***")
)
)
(while (= ha nil)
(progn
(princ "\nNothing selected...")
(setq ha
(entsel "\nSelect the Horizontal alignment: ")
)
(setq ha-type (cdr (assoc 0 (entget (car ha)))))
(if (not (equal ha-type "LWPOLYLINE"))
(progn
(setq ha nil)
(princ "\n***Horizontal Alignment must be a LWPolyline***")
)
)
)
)
(setq ha-ename (entget (car ha)))
(setq ha-ename (cdr (assoc -1 ha-ename)))
(setq ha-object (vlax-ename->vla-object ha-ename))

(vl-cmdf "._text"
(vlax-curve-getstartpoint ha-object)
"0"
"A"
)
(vl-cmdf "._text"
(vlax-curve-getendpoint ha-object)
"0"
"B"
)
)

(defun getexaggeration ()
(initget 2)
(setq ve (getreal "\nEnter the vertical exaggeration <1>: "))
(if (= ve nil)
(setq ve 1)
)
)


(defun listptintersect ()
(setq listaxy nil)

(setq hazvalue (caddr (vlax-curve-getStartPoint ha-object)))

(setq curvas contourstest)
(setq ncurvas (sslength curvas))
(setq listaxy nil)
(setq counter 0)
(while (< counter ncurvas)
(progn
(setq cnivel-ename (ssname curvas counter))
(setq cnivel-object (vlax-ename->vla-object cnivel-ename))

(setq cnivelzvalue
(caddr (vlax-curve-getStartPoint cnivel-object))
)

(setq ha-ENTITY
(subst (cons 38 cnivelzvalue)
(assoc 38 (entget (car ha)))
(entget (car ha))
)
)
(entmod ha-ENTITY)

(setq intersectpt
(vlax-variant-value
(vlax-invoke-method
ha-object
"IntersectWith"
cnivel-object
acExtendNone
)
)
)

(setq test nil)
(setq
test (vl-catch-all-apply
'vlax-safearray->list
(list intersectpt)
)
)
(setq error (vl-catch-all-error-p test))

(if (/= error t)
(progn
(setq intersectpt (vlax-safearray->list intersectpt))
(setq interlength (length intersectpt))

(if (> interlength 3)
(progn
(setq dividelength (/ interlength 3))
(setq count 0)
(while (< count interlength)
(progn
(setq newpt (list (nth count intersectpt)
(nth (+ count 1) intersectpt)
(nth (+ count 2) intersectpt)
)
)

(setq x (vlax-curve-getdistatPoint ha-ename newpt))
(setq z (caddr intersectpt))
(setq xy (list x (* z ve)))
(setq
listaxy (append listaxy (list xy))
)

(setq count (+ count 3))
)
)
)
(progn
(setq x (vlax-curve-getdistatPoint ha-ename intersectpt))
(setq z (caddr intersectpt))
(setq xy (list x (* z ve)))
(setq
listaxy (append listaxy (list xy))
)
)
)

(setq ha-ENTITY
(subst (cons 38 hazvalue)
(assoc 38 (entget (car ha)))
(entget (car ha))
)
)
(entmod ha-ENTITY)
)
)
(setq counter (1+ counter))
)
)

(setq listaxy
(vl-sort listaxy
(function (lambda (e1 e2)
(< (car e1) (car e2))
)
)
)
)

(setq startdist (vlax-curve-getdistatPoint
ha-ename
(vlax-curve-getstartpoint ha-ename)
)
enddist (vlax-curve-getdistatPoint
ha-ename
(vlax-curve-getendpoint ha-ename)
)
)

(setq pt1 (car (car listaxy))
pt2 (car (last listaxy))
)

(if (/= startdist pt1)
(progn
(setq x startdist)
(setq y (+ (* (/ (- (cadr (car listaxy)) (cadr (cadr listaxy)))
(- (car (cadr listaxy)) (car (car listaxy)))
)
(- (car (car listaxy)) startdist)
)
(cadr (car listaxy))
)
)
(setq xy (list x y))
(setq
listaxy (append listaxy (list xy))
)
(setq listaxy
(vl-sort listaxy
(function (lambda (e1 e2)
(< (car e1) (car e2))
)
)
)
)

)
)

(if (/= enddist pt1)
(progn
(setq pos (1- (length listaxy)))
(setq x enddist)
(setq y
(+
(*
(/ (- (cadr (nth pos listaxy))
(cadr (nth (1- pos) listaxy))
)
(- (car (nth pos listaxy)) (car (nth (1- pos) listaxy)))
)
(- enddist (car (nth pos listaxy)))
)
(cadr (nth pos listaxy))
)
)
(setq xy (list x y))
(setq
listaxy (append listaxy (list xy))
)
(setq listaxy
(vl-sort listaxy
(function (lambda (e1 e2)
(< (car e1) (car e2))
)
)
)
)

)
)
)

(defun createprofile ()
(setq variante-listaxy (apply 'append listaxy))

(setq arraySpace
(vlax-make-safearray
vlax-vbdouble
(cons 0
(- (length variante-listaxy) 1)
)
)
)
(setq variante-listaxy
(vlax-safearray-fill arraySpace variante-listaxy)
)

(vlax-make-variant variante-listaxy)


(setq pline (vla-addLightweightPolyline
*ModelSpace*
variante-listaxy
)
)


(vl-cmdf "._text"
(vlax-curve-getstartpoint pline)
"0"
"A"
)
(vl-cmdf "._text"
(vlax-curve-getendpoint pline)
"0"
"B"
)
)

(defun annotate ()
(setq xini (car (vlax-curve-getstartpoint pline))
xend (car (vlax-curve-getendpoint pline))
y (* (fix
(/ (cadr (car (vl-sort listaxy
(function (lambda (e1 e2)
(< (cadr e1) (cadr e2))
)
)
)
)
)
ve
)
)
ve
)
)
;;end setq

(if (< y 0)
(setq y (- y (* 1 ve)))
)

(setq var-xyini (apply 'append (list (list xini y 0))))
(setq var-xyend (apply 'append (list (list xend y 0))))
(createline)
(setq yref (strcat "REFERENCE: " (rtos (/ y ve) 2 2)))
(setq ptloc (list (- xini 30.0) y))
(vl-cmdf "._text" ptloc "0" yref)




(setq lengthlistaxy (length listaxy))
(setq count 0)
(while (< count lengthlistaxy)
(progn
(setq var-xyini (apply 'append
(list (list (car (nth count listaxy))
(cadr (nth count listaxy))
0
)
)
)
)
(setq
var-xyend (apply 'append
(list (list (car (nth count listaxy)) y 0))
)
)
(createline)

(setq ytext (rtos (/ (cadr (nth count listaxy)) ve) 2 2))
(setq xpt (car (nth count listaxy)))
(setq ptloc (list xpt (- y 10.0)))
(vl-cmdf "._text" ptloc "90" ytext)

(setq count (1+ count))
)
)




)



(defun createline ()

(setq arraySpace
(vlax-make-safearray
vlax-vbdouble
(cons 0
(- (length var-xyini) 1)
)
)
)
(setq var-xyini
(vlax-safearray-fill arraySpace var-xyini)
)

(vlax-make-variant var-xyini)

(setq arraySpace
(vlax-make-safearray
vlax-vbdouble
(cons 0
(- (length var-xyend) 1)
)
)
)
(setq var-xyend
(vlax-safearray-fill arraySpace var-xyend)
)

(vlax-make-variant var-xyend)

(setq line (vla-addline
*ModelSpace*
var-xyini
var-xyend
)
)

)




(defun c:qp ()
(timeini)
(inivar)
(getlayname)
(esttexto)
(getha)
(getexaggeration)
(listptintersect)
(createprofile)
(annotate)

(vl-cmdf "._zoom"
(vlax-curve-getstartpoint pline)
(vlax-curve-getendpoint pline)
)
(recvar)
(timeend)
(princ)
)


{code}

Here is the error:

{code}

Command: qp

Please enter the layer name of the contours: btw-xsec


Select the Horizontal alignment:
Enter the vertical exaggeration <1>: 1
error: bad argument type: numberp: nil; error: An error has occurred inside the
*error* functionAutoCAD variable setting rejected: "PICKBOX" nil

{code}

Any help or ideas whould be appreciated. If you have a lisp that cuts cross section profiles that is simple to use, that would help also.

Thanks Edited by: ARCHD on Mar 6, 2009 11:45 AM
Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: ArchD


Those of us using a newsreader cannot read code
posted using the web access.  It is readable if attached as a text
file.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
have a lisp that cuts cross section profiles of polylines. Once in a while I
get this error, and I have no idea why. I do everything the same as normal,
but it happens now and again and I can't find any resolution, even if I draw
another polyline right next to the one that gives me the error, and I get the
same error on that one, even if I draw the line starting from both ends. Here
is the lsp: {code} ;;;Author: Pedro Miguel da Silva Ferreira
Email:pedro_ferreira@netcabo.pt or pferreira@wsatkins.pt ;;;Web page:
http:pwp.netcabo.pt/pedro_ferreira ;;;Location: Portugal, Lisboa ;;;RDS: PMSF
;;;Command Name: qp ;;;Date: 09 of May 2006 ;;;Version: 1.0 ;;;Description:
Visual Lisp Routine that creates a section profile of the terrain based on the
existing contours. (defun timeini () (setq s (getvar "DATE")) (setq seconds (*
86400.0 (- s (fix s)))) ) (defun timeend () (setq s1 (getvar "DATE")) (setq
seconds1 (* 86400.0 (- s1 (fix s1)))) (setq seconds2 (fix (- seconds1
seconds))) (princ (strcat "\nTime : " (itoa seconds2) " seconds" ) ) ) (defun
inivar () (setq cmd_ini (getvar "cmdecho") fla_ini (getvar "flatland") osm_ini
(getvar "osmode") ort_ini (getvar "orthomode") plt_ini (getvar "plinetype")
aup_ini (getvar "auprec") uni_ini (getvar "unitmode") lun_ini (getvar
"lunits") diz_ini (getvar "dimzin") edg_ini (getvar "edgemode") ) (setvar
"CMDECHO" 0) (setvar "FLATLAND" 0) (setvar "OSMODE" 0) (setvar "ORTHOMODE" 0)
(setvar "PLINETYPE" 2) (setvar "AUPREC" 0) (setvar "UNITMODE" 1) (setvar
"LUNITS" 2) (setvar "DIMZIN" 0) (setvar "EDGEMODE" 1) ) (defun recvar ()
(setvar "CMDECHO" cmd_ini) (setvar "FLATLAND" fla_ini) (setvar "OSMODE"
osm_ini) (setvar "ORTHOMODE" ort_ini) (setvar "PLINETYPE" plt_ini) (setvar
"AUPREC" aup_ini) (setvar "UNITMODE" uni_ini) (setvar "LUNITS" lun_ini)
(setvar "DIMZIN" diz_ini) (setvar "EDGEMODE" edg_ini) ) (defun getlayname ()
(setq contourstest nil) (setq layername (getstring "\nPlease enter the layer
name of the contours: " ) ) (setq contourstest (ssget "_x" (list (cons -4
"vla-object
ha-ename)) (vl-cmdf "._text" (vlax-curve-getstartpoint ha-object) "0" "A" )
(vl-cmdf "._text" (vlax-curve-getendpoint ha-object) "0" "B" ) ) (defun
getexaggeration () (initget 2) (setq ve (getreal "\nEnter the vertical
exaggeration <1>: ")) (if (= ve nil) (setq ve 1) ) ) (defun
listptintersect () (setq listaxy nil) (setq hazvalue (caddr
(vlax-curve-getStartPoint ha-object))) (setq curvas contourstest) (setq
ncurvas (sslength curvas)) (setq listaxy nil) (setq counter 0) (while (<
counter ncurvas) (progn (setq cnivel-ename (ssname curvas counter)) (setq
cnivel-object (vlax-ename->vla-object cnivel-ename)) (setq cnivelzvalue
(caddr (vlax-curve-getStartPoint cnivel-object)) ) (setq ha-ENTITY (subst
(cons 38 cnivelzvalue) (assoc 38 (entget (car ha))) (entget (car ha)) ) )
(entmod ha-ENTITY) (setq intersectpt (vlax-variant-value (vlax-invoke-method
ha-object "IntersectWith" cnivel-object acExtendNone ) ) ) (setq test nil)
(setq test (vl-catch-all-apply 'vlax-safearray->list (list intersectpt) ) )
(setq error (vl-catch-all-error-p test)) (if (/= error t) (progn (setq
intersectpt (vlax-safearray->list intersectpt)) (setq interlength (length
intersectpt)) (if (> interlength 3) (progn (setq dividelength (/
interlength 3)) (setq count 0) (while (< count interlength) (progn (setq
newpt (list (nth count intersectpt) (nth (+ count 1) intersectpt) (nth (+
count 2) intersectpt) ) ) (setq x (vlax-curve-getdistatPoint ha-ename newpt))
(setq z (caddr intersectpt)) (setq xy (list x (* z ve))) (setq listaxy (append
listaxy (list xy)) ) (setq count (+ count 3)) ) ) ) (progn (setq x
(vlax-curve-getdistatPoint ha-ename intersectpt)) (setq z (caddr intersectpt))
(setq xy (list x (* z ve))) (setq listaxy (append listaxy (list xy)) ) ) )
(setq ha-ENTITY (subst (cons 38 hazvalue) (assoc 38 (entget (car ha))) (entget
(car ha)) ) ) (entmod ha-ENTITY) ) ) (setq counter (1+ counter)) ) ) (setq
listaxy (vl-sort listaxy (function (lambda (e1 e2) (< (car e1) (car e2)) )
) ) ) (setq startdist (vlax-curve-getdistatPoint ha-ename
(vlax-curve-getstartpoint ha-ename) ) enddist (vlax-curve-getdistatPoint
ha-ename (vlax-curve-getendpoint ha-ename) ) ) (setq pt1 (car (car listaxy))
pt2 (car (last listaxy)) ) (if (/= startdist pt1) (progn (setq x startdist)
(setq y (+ (* (/ (- (cadr (car listaxy)) (cadr (cadr listaxy))) (- (car (cadr
listaxy)) (car (car listaxy))) ) (- (car (car listaxy)) startdist) ) (cadr
(car listaxy)) ) ) (setq xy (list x y)) (setq listaxy (append listaxy (list
xy)) ) (setq listaxy (vl-sort listaxy (function (lambda (e1 e2) (< (car e1)
(car e2)) ) ) ) ) ) ) (if (/= enddist pt1) (progn (setq pos (1- (length
listaxy))) (setq x enddist) (setq y (+ (* (/ (- (cadr (nth pos listaxy)) (cadr
(nth (1- pos) listaxy)) ) (- (car (nth pos listaxy)) (car (nth (1- pos)
listaxy))) ) (- enddist (car (nth pos listaxy))) ) (cadr (nth pos listaxy)) )
) (setq xy (list x y)) (setq listaxy (append listaxy (list xy)) ) (setq
listaxy (vl-sort listaxy (function (lambda (e1 e2) (< (car e1) (car e2)) )
) ) ) ) ) ) (defun createprofile () (setq variante-listaxy (apply 'append
listaxy)) (setq arraySpace (vlax-make-safearray vlax-vbdouble (cons 0 (-
(length variante-listaxy) 1) ) ) ) (setq variante-listaxy (vlax-safearray-fill
arraySpace variante-listaxy) ) (vlax-make-variant variante-listaxy) (setq
pline (vla-addLightweightPolyline *ModelSpace* variante-listaxy ) ) (vl-cmdf
"._text" (vlax-curve-getstartpoint pline) "0" "A" ) (vl-cmdf "._text"
(vlax-curve-getendpoint pline) "0" "B" ) ) (defun annotate () (setq xini (car
(vlax-curve-getstartpoint pline)) xend (car (vlax-curve-getendpoint pline)) y
(* (fix (/ (cadr (car (vl-sort listaxy (function (lambda (e1 e2) (< (cadr
e1) (cadr e2)) ) ) ) ) ) ve ) ) ve ) ) ;;end setq (if (< y 0) (setq y (- y
(* 1 ve))) ) (setq var-xyini (apply 'append (list (list xini y 0)))) (setq
var-xyend (apply 'append (list (list xend y 0)))) (createline) (setq yref
(strcat "REFERENCE: " (rtos (/ y ve) 2 2))) (setq ptloc (list (- xini 30.0)
y)) (vl-cmdf "._text" ptloc "0" yref) (setq lengthlistaxy (length listaxy))
(setq count 0) (while (< count lengthlistaxy) (progn (setq var-xyini (apply
'append (list (list (car (nth count listaxy)) (cadr (nth count listaxy)) 0 ) )
) ) (setq var-xyend (apply 'append (list (list (car (nth count listaxy)) y 0))
) ) (createline) (setq ytext (rtos (/ (cadr (nth count listaxy)) ve) 2 2))
(setq xpt (car (nth count listaxy))) (setq ptloc (list xpt (- y 10.0)))
(vl-cmdf "._text" ptloc "90" ytext) (setq count (1+ count)) ) ) ) (defun
createline () (setq arraySpace (vlax-make-safearray vlax-vbdouble (cons 0 (-
(length var-xyini) 1) ) ) ) (setq var-xyini (vlax-safearray-fill arraySpace
var-xyini) ) (vlax-make-variant var-xyini) (setq arraySpace
(vlax-make-safearray vlax-vbdouble (cons 0 (- (length var-xyend) 1) ) ) )
(setq var-xyend (vlax-safearray-fill arraySpace var-xyend) )
(vlax-make-variant var-xyend) (setq line (vla-addline *ModelSpace* var-xyini
var-xyend ) ) ) (defun c:qp () (timeini) (inivar) (getlayname) (esttexto)
(getha) (getexaggeration) (listptintersect) (createprofile) (annotate)
(vl-cmdf "._zoom" (vlax-curve-getstartpoint pline) (vlax-curve-getendpoint
pline) ) (recvar) (timeend) (princ) ) {code} Here is the error: {code}
Command: qp Please enter the layer name of the contours: btw-xsec Select the
Horizontal alignment: Enter the vertical exaggeration <1>: 1 error: bad
argument type: numberp: nil; error: An error has occurred inside the *error*
functionAutoCAD variable setting rejected: "PICKBOX" nil {code} Any help or
ideas whould be appreciated. If you have a lisp that cuts cross section
profiles that is simple to use, that would help also. Thanks Edited by: ARCHD
on Mar 6, 2009 11:45 AM
Message 3 of 7
ArchD
in reply to: ArchD

Ya, wow, that's bad, I appologize. Here is the lsp in txt
Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
Message 4 of 7
Anonymous
in reply to: ArchD

Without examining it too closely, it seems to function here. Try this.
Load the code in vlide, check "break on error" and load and run the program.
Then use the debug->Last break source to see where the error is occuring.

You could also use (vl-bt) instead, perhaps.

Your initial ssgets could be simplified:

(ssget "_x"
(list
'(0 . "lwpolyline,polyline,line,spline")
(cons 8 layername)))



wrote in message news:6137705@discussion.autodesk.com...
Ya, wow, that's bad, I appologize. Here is the lsp in txt
Message 5 of 7
ArchD
in reply to: ArchD

I ran the break on error and attached it. Just search for ;; BREAK ON ERROR and you'll find the line it highlighted for me.

Thanks for the help. Edited by: ARCHD on Mar 6, 2009 1:50 PM
Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
Message 6 of 7
Anonymous
in reply to: ArchD

I'm afraid even though the program may work, it is so poorly written that it
is almost impossible to interpret.
Examples:
1 Variables labelled pt1 and pt2 aren't points but x coordinates of
successive points.
2 It looks like he might be dividing the difference in y values by the
difference in x values. But what if the x values are the same?
3 using (append ) rather than (cons )
4 No meaningful comments.
5 Widespread use of global variables makes states at particular points
difficult to interpret.


wrote in message news:6137802@discussion.autodesk.com...
I ran the error on break and attached it. Just search for ;; ERROR ON BREAK
and you'll find the line it highlighted for me. Thanks for the help.
Message 7 of 7
ArchD
in reply to: ArchD

Yes, I can understand what you mean. Using the lsp is cumbersome in itself. I guess my next task is to find a lsp that is for the same purpose, but written better, and maybe with more functionality, like choosing where to place the profile rather than it placing it at 0,0. Thats pretty annoying.

Thank you for your help. If anyone has a lsp they use to cut cross section profiles of contours, I would really appreciate it.
Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost