Author Topic: ucs change -> offset connect code problem  (Read 891 times)

0 Members and 1 Guest are viewing this topic.

dussla

  • Bull Frog
  • Posts: 291
ucs change -> offset connect code problem
« on: December 29, 2020, 08:54:29 AM »
hi  friends
i made this code

in wcs , that work well
but
in ucs  , that did not work well
pls can you say error problem ?



(defun c:qc()
(setvar "cmdecho" 0 )
(setvar "osmode" 33 )
(setvar "orthomode" 0 )
(setvar "osmode" 0 )
(setq ent (nentsel "\n select ent: "))
(setq ent11 (car ent))
(setq offset11(getreal "\noffset distance :"))



(setq pp1 (getpoint "\n Offset Target Point :"))




(command "offset" offset11 ent pp1 "")
(setq PL2 (entlast))




(setq MPL1 (vlax-ename->vla-object ent11)
spl1 (vlax-curve-getStartPoint MPL1)
epl1 (vlax-curve-getEndPoint MPL1))
(setq MPL2 (vlax-ename->vla-object PL2)
spl2 (vlax-curve-getStartPoint MPL2)
epl2 (vlax-curve-getEndPoint MPL2))




(trans  spl1  0 1 2 )
(trans  spl2  0 1 2 )
(trans  epl1  0 1 0 )
(trans  epl2  0 1 0 )



(command "pline" spl1  spl2 "")
(setq obj01 (entlast ))
(command "pline" epl1 epl2 "")
(setq obj02 (entnext obj01))
(command "pedit" ent  "j"  obj01 PL2 obj02  "" "")
(setvar "osmode" 35 )
)