Jump to content

; error: too few arguments


Recommended Posts

Posted

Please correct this routine...its showing ; error: too few arguments error

 

(defun c:1 (/ file dta p i) ;POints to TeXT 
(setq file (open (getfiled "specify output file" "c:/" "csv" 1) "w"))
(setq dta (ssget '((0 . "text"))))
(repeat (setq i (sslength dta))
(ssname (setq i (1- i)))
(write-line
(strcat (rtos (car p) 2 3) ","
(rtos (cadr p) 2 3) ","
(rtos (caddr p) 2 3)
) file)
)
(close file)
(Princ)
)

 

Thanks a lot

Posted
[b](setq p (cdr (assoc 10 (entget[/b] (ssname [b]dta[/b] (setq i (1- i))))[b])))[/b]

Posted

thanks a lot pBE..... Problem solved

one more thing i want to ask you is,,, I want to put header on each column Just see attached image

heas.JPG

Posted

(defun c:1 (/ file dta p i)		;POints to TeXT 
[b] (if (and[/b]
(setq file (open (getfiled "specify output file" "c:/" "csv" 1) "w"))
 	(setq dta (ssget '((0 . "text"))))[b])[/b]
  [b] (progn
 	  (write-line "EASTING,NORTHING,ELEVATION" file)[/b]
  (repeat (setq i (sslength dta))
    (setq p (cdr (assoc 10 (entget (ssname dta (setq i (1- i)))))))
    (write-line
      (strcat (rtos (car p) 2 3)
	      ","
	      (rtos (cadr p) 2 3)
	      ","
	      (rtos (caddr p) 2 3)
	      )
      file
      )
    )
 (close file)
     [b])
   )[/b]
 (Princ)
 )

 

HTH

Posted

thankx a lot pBE....problem totally solved

Posted
thankx a lot pBE....problem totally solved

 

Good for you.

 

Keep on coding satishrajdev, you'll get there :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...