• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

select a test item for elimination

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
select a point
Code:
 (setq lista (entget (car (entsel)) '("group")))
(setq xlist (assoc -3 lista))
(setq txtdata (car (cdr xlist)))
(setq point1 (cdr)
(setq en1 (cdr -1 ed1))
I would like to delete or move, after some instruction, this point.
How do I define it to be able to remove it or move it?
with point1 (via the coordinates) is not possible because, in the same position, there are more elements, what to do?
Thanks a million!
 
list is what you need to do the operation:
(command "_move" list " from your point to point)
(command "_erase" list ")
 
thanks rpor66 but it does not work.
This is the entire command list:
Code:
 ;

(defun movepoint (/ ed1 xlist txtdata gaussboaga controllerpt cx cy pointm1)

(Setvar "osmode" 16384)

(while (/= controllerpt "not defined")

(setq list (entget (entsel)) (group))))
(setq xlist (assoc -3 list)
(setq txtdata (car))
(setq point1 (cdr (assoc 10 list))
(setq en1 (cdr -1 ed1))

(if (= xlist nil)
(alert "the selected string is not suitable, no extended data is associated!")
(progn)
(setq gaussboaga (cdr 5 txtdata)))
(setq controllerpt (nth 7 txtdata)))

(setq cx (substr gaussboaga 1 12))
(setq cy (substr gaussboaga 14 12))

(setq pointm (list (+ (atof cx) 1.00) (+ (atof cy) 1.00) 0.00)
(command "_move" list "" gaussboaga puntom ")
(command "_line" gaussboaga puntom ")
(command "_change" "_last" "_p" "_layer" "lines"")
(identifying setq "000100")

);
);
);

);
the line > gaussboaga pointm < but > list < is not moved to pointm.
Thanks again.
 
thanks rpor66 but it does not work.
This is the entire command list:
Code:
 ;

(defun move point (/ ed1 xlist txtdata gaussboaga controllerpt cx cy point1 ent)

(Setvar "osmode" 16384)

(while (/= controllerpt "not defined")

(setq ent (entsel))
(setq list (entget (car ent) '("group")))
(setq xlist (assoc -3 list)
(setq txtdata (car))
(setq point1 (cdr (assoc 10 list))
(setq en1 (cdr -1 ed1))

(if (= xlist nil)
(alert "the selected string is not suitable, no extended data is associated!")
(progn)
(setq gaussboaga (cdr 5 txtdata)))
(setq controllerpt (nth 7 txtdata)))

(setq cx (substr gaussboaga 1 12))
(setq cy (substr gaussboaga 14 12))

(setq pointm (list (+ (atof cx) 1.00) (+ (atof cy) 1.00) 0.00)
(command "_move" ent "" gaussboaga puntom ")
(command "_line" gaussboaga puntom ")
(command "_change" "_last" "_p" "_layer" "lines"")
(identifying setq "000100")

);
);
);

);
the line > gaussboaga pointm < but > list < is not moved to pointm.
Thanks again.
move to work you have to pass the selection group or the name of the entity.
bye
 
I have this other code with the same problem, the selected item is not deleted.
Code:
 (defun c:3dinputdisto (/ ed1 ed13 fp1 fp2 fc2 notion prisma quota namepoint difference prisma pointcliccato cx cy xyz nomeentita object oldlist np name gaussboaga thedata newlist angle stranguno slm3 deltaslmnata hp2f deltaprisma delta3 dist


(Guidelines)
(attention)

(setq fc2 (findfile "c:\\\\autocadsupport\\\\\\\\\\name punto.dat"))

(if fc)
(vl-file-delete "c:\\\autocadsupport\\\varie\\name punto.dat")
);

(Setvar "osmode" 16384)

(if (= point1 nil)
(progn)
(alert "you must first define the celerimetric station (celerimetric station - point1)")
(exit)
)
)

(setq fp3 (open "c:\\\\autocadsupport\\\contatori\\\counter.dat" "r"))
(setq counter (read-line fp3))
(setq step (read-line fp3))
(close fp)

(setq xlist1 nil)
(Sectq and 1 nil)
(setq txt1 nil)
(sing)
(= ed1 nil)
(setq ed1 (entsel "\nselect the name of the point to be inserted : "))

(if (/= ed1 nil)
(progn)
(setq list1 (entget (car e1) '("group")))
(setq xlist1 (assoc -3 list1))

(if (/= xlist1 nil)
(progn)
(setq txtdata1 (car (cdr xlist1))
(setq ed1 (entget (car ed1)))
(setq txt1 (cdr 1 ed1))
(setq en1 (cdr -1 ed1))
(setq point2 (cdr 10 ed1))
(redraw en1 3)

(setq nomex1 (nth 1 txtdata1))
(setq type-point1 (cdr 2 txtdata1))
(setq quota1 (cdr (nth 3 txtdata1)))
(setq ecef1 (nth 4 txtdata1))
(setq gaussboaga1 (cdr 5 txtdata1))
(setq controllerstz1 (nth 6 txtdata1))
(setq controlpt1 (cdr 7 txtdata1))
);
);
);
);
);

; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(setq fc2 (findfile "c:\\\\autocadsupport\\\\\\\\\\name punto.dat"))

(if fc)
(startapp "c:\autocadsupporto\\\liberty\\3ddisto.exe "c:\\\autocadsupport\\\liberty\\3ddisto.tkn")
);

; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(setq alphamode nil)
(while)
(setq fp5 (open "c:\\\\autocadsupporto\\celerimetric\\\daticele.dat" "r"))
(setq point name (read-line fp5))
(setq share (read-line fp5))
(setq delta (read-line fp5))
(setq alpha (read-line fp5))
(setq hdisto (read-line fp5))
(setq note (read-line fp5))
(setq deltamode (read-line fp5))
(setq alphamode (read-line fp5))
(close fp)
);

(princ "\n")
(princ > > > > > > > > > > > > > > > > > > > > > )
(princ point name)
(princ "\n")

(princ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
(princ point)
(princ "\n")

(command "_line" point1 point2")
(command "_change" "_last" "_p" "_layer" "lines"")

(command "_circle" point1 0.15 ")
(command "_text" point2 0.40 0 point name ")
(command "_change" "_last" "_p" "_layer" "testoblu"")
(command "_erase" and "")

(setq naming (entlast))

(seq object "group")

(if (not (tblsearch "appid" object)
(regapp object)
)

(setq oldlist (entget nomeentita)

(setq np (assoc 1 oldlist)
(setq point name (cdr np))
(setq xyz (cdr 10 oldlist))
(setq gaussboaga (strcat (rtos (car xyz)) "," (rtos (cadr xyz))))

(setq thedata (list -3 (cons 1000 point name) (cons 1000 "celerimetric point 3d") (cons 1000 quota) (cons 1000 "---------------") (cons 1000 gaussboaga) (cons 1000 vector orientation) (cons 1000 "definite"))))

(setq newlist)
(entmod newlist)

);
I don't understand it's so simple.
Thank you.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top