LISP NOT WORKING IN ICAD 10

#1
Hi
I have written a lsp file to create a length of pipe between 2 points, eventually to be incorporated into a larger routine.
It works as exected in Icad 9.0 (9.0.815.0.PE+.VC15.x64.RF90), but in Icad10 (10.0.1108.115690.PE+.VC15.x64.CMS100) the results are wrong!! see below (lisp file attached)

The user is intended to 'pick' the start point of the pipe run (centre of the elbow fitting) and the end point (top end point of vertical line).

Icad 9.0 results.
Image
.

Icad10 results.
Image
.

Is this s bug?
SteveN
Attachments
extucs.zip
(542 Bytes) Downloaded 215 times

Re: LISP NOT WORKING IN ICAD 10

#4
I've made some modifications, it works both of the 9.2 and 10 version.
Here's the code:

Code: Select all

(defun c:extucs ( / spt1 spt2 dis ENT1 ENT2)
 (if (and (setq spt1 (getpoint "\nSpecify Start point of Pipe"))
          (setq spt2 (getpoint "\nSpecify End point of Pipe" spt1) )
     )
   (progn
     (command "ucs" "ZA" spt1 spt2)
     (command "circle" "0,0,0" "d" "120.00")
     (setq ENT1 (entlast))
     (command "circle" "0,0,0" "d" "100.00")
     (setq ENT2 (entlast))

     (setq dis (distance spt1 spt2))

     (command "extrude" ENT1 "" dis "")
     (setq ENT1 (entlast))

     (command "extrude" ENT2 "" dis "")
     (setq ENT2 (entlast))
     
     (command "subtract" ENT1 "" ENT2 "")

     (command "ucs" "_P")
    ) ;_ end of progn
   )  ;_ end of IF
; (princ)
 )
cron