McDermott1711
Mechanical
- Nov 17, 2010
- 318
This is address of a Telegram bot that works based on the AI:
[URL unfurl="true"]https://t.me/OpenAiChat_bot[/url]
I asked it to write a code in Autolisp computer language to list coordinates of selected points and below is its answer:
(defun c:listcoords ()
(setq SS (ssget))
(setq pts ssleng(SS) ; set number of points in the selection set)
(if (not (= 0 pts)) ; if more than 0 points were selected
(prompt "\\Select Points:")
(princ " \\No points selected.") ; print message to console and exit if none selected
(foreach p ss ; loop through each point object in list one at a time
(initget 5)
(setq PntPt(trans(cdr(assoc 10(entget p)))) ; store coordinates of point in variable
(prompt " \\Point coordiantes are:") ; prompt user for input in console window
(princ " X = " PntPt[0] ", Y = " PntPt1 ) ; print x,y coordinate values in autocad command window
) ;; end foreach loop
) ;; end IF statement
) ;; close funciton definition
Nothing is more fairly distributed than common sense: no one thinks he needs more of it than he already has. Rene Descartes
[URL unfurl="true"]https://t.me/OpenAiChat_bot[/url]
I asked it to write a code in Autolisp computer language to list coordinates of selected points and below is its answer:
(defun c:listcoords ()
(setq SS (ssget))
(setq pts ssleng(SS) ; set number of points in the selection set)
(if (not (= 0 pts)) ; if more than 0 points were selected
(prompt "\\Select Points:")
(princ " \\No points selected.") ; print message to console and exit if none selected
(foreach p ss ; loop through each point object in list one at a time
(initget 5)
(setq PntPt(trans(cdr(assoc 10(entget p)))) ; store coordinates of point in variable
(prompt " \\Point coordiantes are:") ; prompt user for input in console window
(princ " X = " PntPt[0] ", Y = " PntPt1 ) ; print x,y coordinate values in autocad command window
) ;; end foreach loop
) ;; end IF statement
) ;; close funciton definition
Nothing is more fairly distributed than common sense: no one thinks he needs more of it than he already has. Rene Descartes