DIỄN ĐÀN TÂM NĂNG DƯỠNG SINH PHỤC HỒI SỨC KHỎE
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

DIỄN ĐÀN TÂM NĂNG DƯỠNG SINH PHỤC HỒI SỨC KHỎE

Chào mừng quý vị và các bạn đến với diễn đàn https://tamnangduongsinh.forumvi.com
 
Trang ChínhPortalGalleryLatest imagesTìm kiếmĐăng kýĐăng Nhập
Đăng Nhập
Tên truy cập:
Mật khẩu:
Đăng nhập tự động mỗi khi truy cập: 
:: Quên mật khẩu
Hỗ trợ trực tuyến
Admin : Nguyễn Gia Sơn điện thoại 0983559480
Thống kê truy cập diễn đàn
Top posters
tamnangduongsinh (586)
lisp xuất text sang excel I_vote_lcaplisp xuất text sang excel I_voting_barlisp xuất text sang excel I_vote_rcap 
Admin (372)
lisp xuất text sang excel I_vote_lcaplisp xuất text sang excel I_voting_barlisp xuất text sang excel I_vote_rcap 
tamphat (129)
lisp xuất text sang excel I_vote_lcaplisp xuất text sang excel I_voting_barlisp xuất text sang excel I_vote_rcap 
Latest topics
» Hàm lượng cốt thép
lisp xuất text sang excel I_icon_minitimeTue Apr 09, 2024 11:15 am by tamnangduongsinh

» Hướng dẫn cách kiểm tra độ chai pin laptop, máy tính cực đơn giản
lisp xuất text sang excel I_icon_minitimeFri Mar 29, 2024 9:20 am by tamnangduongsinh

» GIẾNG CÁT
lisp xuất text sang excel I_icon_minitimeWed Mar 27, 2024 3:58 pm by tamnangduongsinh

» HƯỚNG DẪN PHÂN TÍCH THÀNH PHẦN HẠT CỦA CÁT
lisp xuất text sang excel I_icon_minitimeSat Mar 23, 2024 9:53 am by tamnangduongsinh

» Hướng dẫn cách xả pin laptop đúng cách
lisp xuất text sang excel I_icon_minitimeSat Mar 23, 2024 9:35 am by tamnangduongsinh

» "Vụ tử vong vì laptop phát nổ ở Hải Dương": Có thật là vừa cắm sạc vừa dùng sẽ khiến máy tính phát nổ?
lisp xuất text sang excel I_icon_minitimeSat Mar 23, 2024 8:56 am by tamnangduongsinh

» Hướng dẫn khắc phục lỗi không ghost được với ổ cứng SSD
lisp xuất text sang excel I_icon_minitimeFri Mar 15, 2024 2:35 pm by Admin

» Cách Boot WinPE từ ổ cứng không cần USB với 1 click
lisp xuất text sang excel I_icon_minitimeFri Mar 15, 2024 2:33 pm by Admin

»  Cách bung file Ghost (.GHO) trên máy tính chuẩn UEFI
lisp xuất text sang excel I_icon_minitimeFri Mar 15, 2024 2:31 pm by tamnangduongsinh

» Hướng dẫn sử dụng Grab Booking trên điện thoại cực kỳ đơn giản
lisp xuất text sang excel I_icon_minitimeFri Mar 15, 2024 11:36 am by tamnangduongsinh

Tìm kiếm
 
 

Display results as :
 

 


Rechercher Advanced Search

KẾT QUẢ XỔ SỐ
Keywords
4 map cống 1 2 tròn CHIỀU 3 tiện lisp 5 timeout ct_height 6

 

 lisp xuất text sang excel

Go down 
Tác giảThông điệp
tamnangduongsinh




Tổng số bài gửi : 586
Tổng số điểm : 1397
Được cảm ơn : 85
Join date : 05/12/2014

lisp xuất text sang excel Empty
Bài gửiTiêu đề: lisp xuất text sang excel   lisp xuất text sang excel I_icon_minitimeThu Oct 13, 2016 4:44 pm

;TEXTOUT.LSP By: Jeffery P. Sanders
;This program gets text from an AutoCAD drawing and writes it to a text file.

;define program - listing your variable names here
; resets them to nil after the program finishes
(defun C:TEXTOUT(/ lts ernote filen fil eset en enlist cntr)

;turn echo off
(setvar "cmdecho" 0)

;get ltscale (Note: ltscale should always equal dimscale)
(setq lts(getvar "ltscale"))

;set the exit note to successful
(setq ernote "\n....TextOut Complete.")

;use dialog box to set file name / the 1 allows
;the user to type in a new file name
;the "txt" sets the default to be "*.txt"
(setq filen
(getfiled "Type or Select Text File Name" "" "txt" 1)
)

;open file to write
(if (setq fil(open filen "w"))

;progn necessary for multiple statements inside an if statement
(progn

;if ssget returns a valid selection set
(if (setq eset(ssget))

;progn necessary for multiple statements inside an if statement
(progn

;set the entity counter to zero [the first entity in a set is zero]
(setq cntr 0)

;step through each entity in the selection set
(while (< cntr (sslength eset))

;get the entity name indexed by cntr
(setq en(ssname eset cntr))

;get the DXF group codes for the entity
(setq enlist(entget en))

;check the group code 0 to see if entity type = TEXT
(if(= "TEXT" (cdr(assoc 0 enlist)))

;progn necessary for multiple statements inside an if statement
(progn

;get the text string from the entity's DXF Group Code 1
(setq str(cdr(assoc 1 enlist)))

;print the string to the command line
(princ (strcat "\nOutput To File: " str))

;print the string to the file
(princ (strcat "\n" str) fil)

) ;close the if progn

) ;close the if statement

;increment the counter to get the next entity
(setq cntr(+ cntr 1))

) ;close the while loop

;close the text file
(close fil)

) ;close the if progn

;set the exit note as an error
(setq ernote "\nError - No Entities Selected.")

) ; close the if statement

) ;close the if progn

;set the exit note to be an error
(setq ernote (strcat "\nError - Could not create File: " filen))

) ;close the if statement

;turn the command echo back on
(setvar "cmdecho" 1)

;print the exit note to the command line
(princ ernote)

;clear the command line
(princ "\n ")

;supress last echo
(princ)

) ;close the program
Về Đầu Trang Go down
tamnangduongsinh




Tổng số bài gửi : 586
Tổng số điểm : 1397
Được cảm ơn : 85
Join date : 05/12/2014

lisp xuất text sang excel Empty
Bài gửiTiêu đề: Re: lisp xuất text sang excel   lisp xuất text sang excel I_icon_minitimeMon Dec 10, 2018 3:58 pm

Về Đầu Trang Go down
tamnangduongsinh




Tổng số bài gửi : 586
Tổng số điểm : 1397
Được cảm ơn : 85
Join date : 05/12/2014

lisp xuất text sang excel Empty
Bài gửiTiêu đề: Re: lisp xuất text sang excel   lisp xuất text sang excel I_icon_minitimeMon Dec 10, 2018 4:00 pm

(defun c:exptxt()
(setq
ss (ssget '((0 . "TEXT")))
fn (getfiled "Ten file: " "" "txt" 1)
f (open fn "w")
lst (ss2ent ss)
)
(foreach e lst
(setq tt (entget e)
p (cdr (assoc 10 tt))
x (rtos (car p))
y (rtos (cadr p))
z (cdr (assoc 1 tt))

)
(write-line (strcat x " " y " " z) f)
)
(close f)
(princ)
)

(defun ss2ent (ss / sodt index lstent)
(setq
sodt (if ss
(sslength ss)
0
)
index 0
)
(repeat sodt
(setq ent (ssname ss index)
index (1+ index)
lstent (cons ent lstent)
)
)
(reverse lstent)
)

Nguồn bài viết : https://www.cadviet.com/forum/topic/4235-export-t%E1%BA%ADp-%C4%91i%E1%BB%83m-text-th%C3%A0nh-file-%C4%91u%C3%B4i-txt/
Về Đầu Trang Go down
Sponsored content





lisp xuất text sang excel Empty
Bài gửiTiêu đề: Re: lisp xuất text sang excel   lisp xuất text sang excel I_icon_minitime

Về Đầu Trang Go down
 
lisp xuất text sang excel
Về Đầu Trang 
Trang 1 trong tổng số 1 trang
 Similar topics
-
» lisp xuất text sang excel có kèm tọa độ
» Xuất text từ cad sang excel
» Mở file dự toán xuất sang excel bị lỗi font.
» Lisp giãn text
» Lisp tìm kiếm và thay thế text cũ bằng text mới

Permissions in this forum:Bạn không có quyền trả lời bài viết
DIỄN ĐÀN TÂM NĂNG DƯỠNG SINH PHỤC HỒI SỨC KHỎE :: Autocad :: Lisp autocad-
Chuyển đến