nithink55 发表于 2022-7-5 23:42:04

x,y,z extraction by selecting

Hii all i have got a lisp file from internet which will extract x,y,z coordinates by selecting all objects...
 
but i am not able to select objects.. when i am selecting it says "Select objects: 0 found, 0 total"
 
please help:(
 

(defun C:WPOINT ( / ss fd file)(cond( (not (setq ss (ssget '((0 . "POINT,INSERT"))))))( (not (setq file (getfiled "Export Points" "" "csv" 1))))( (not (setq fd (open file "w")))(alert "Unable to open file for output"))(t (repeat (setq i (sslength ss))(write-point(ssname ss (setq i (1- i)))fd6))(close fd)))(princ))

wkplan 发表于 2022-7-5 23:51:09

Hi,
 
only Points and Inserts (Blockreferences) will selected:
 

( (not (setq ss (ssget '((0 . "POINT,INSERT"))))))Are you sure there are those objects in your drawing?
 
regards
Wolfgang

nithink55 发表于 2022-7-5 23:56:24

61072-FR0.dxf
 
please find the drawing...
 
i think only lines are there.. please help
 
regards,
nithin

MSasu 发表于 2022-7-6 00:00:51

Along being limited to points and block instances (as already noted), your code is calling a WRITE-POINT function, whose definition seems to don't be included.

MSasu 发表于 2022-7-6 00:03:57

To extract the coordinates of your lines may want to check the built-in DATAEXTRACTION command.

SLW210 发表于 2022-7-6 00:09:22

nithink55,
 
 
Please read the Code posting guidelines and edit your original post to include the Code in Code Tags, not Quote Tags.

wkplan 发表于 2022-7-6 00:14:05

Look her:
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Extract-Point-Data-CALLING-ALL-LISP-GURUS/td-p/885377

nithink55 发表于 2022-7-6 00:20:15

Is there any lisp code to extract x,y,z points of selected object ( not by selecting each points of objects)...

nithink55 发表于 2022-7-6 00:24:07

Yes Mr. wkplan i have taken code from that site...but problem comes when selecting objects...... "Select objects: 0 found, 0 total"

nithink55 发表于 2022-7-6 00:27:12

(defun C:WPOINT ( / ss fd file)(cond( (not (setq ss (ssget '((0 . "POINT,INSERT"))))))( (not (setq file (getfiled "Export Points" "" "csv" 1))))( (not (setq fd (open file "w")))(alert "Unable to open file for output"))(t (repeat (setq i (sslength ss))(write-point(ssname ss (setq i (1- i)))fd6))(close fd)))(princ))
页: [1] 2
查看完整版本: x,y,z extraction by selecting