Lee Mac 发表于 2022-7-6 06:08:14

批块插入器

我意识到这是一个相当简单的程序,随着编码的进行,但它被请求的次数超过了我的记忆,所以我想我应该试着写一个半体面的程序。
 
这就是。。。
 
所有指令都在标题中,将读取txt或csv
 

;;;¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,;;;
;;;ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,¤º°`°º¤;;;
;;                                                                               ;;
;;                                                                               ;;
;;                        --=={Block Insertor}==--                         ;;
;;                                                                               ;;
;;Program will insert a specific block at points as listed in either txt or    ;;
;;csv file. If attribute values follow the points listed, then these will be   ;;
;;entered into the block.                                                      ;;
;;                                                                               ;;
;;Input File format should be as follows:-                                     ;;
;;--------------------------------------------                                 ;;
;;x-coord y-coord z-coord attrib(1) attrib(2) attrib(3) ... attrib(n)          ;;
;;                                                                               ;;
;;If txt file is used, these values should be separated by a space, if a csv   ;;
;;file is used, the values should be in adjacent cells.                        ;;
;;                                                                               ;;
;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;;
;;                                                                               ;;
;;FUNCTION SYNTAX:BlkIns                                                   ;;
;;                                                                               ;;
;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;;
;;                                                                               ;;
;;AUTHOR:                                                                      ;;
;;                                                                               ;;
;;Copyright © Lee McDonnell, December 2009. All Rights Reserved.               ;;
;;                                                                               ;;
;;      { Contact: Lee Mac @ TheSwamp.org, CADTutor.net }                        ;;
;;                                                                               ;;
;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;;
;;                                                                               ;;
;;VERSION:                                                                     ;;
;;                                                                               ;;
;;    ø 1.0   ~¤~   5th December 2009   ~¤~   º First Release                  ;;
;;...............................................................................;;
;;    ø 1.1   ~¤~   5th December 2009   ~¤~   º Added Dialog interface.          ;;
;;...............................................................................;;
;;                                                                               ;;
;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;;
;;                                                                               ;;
;;;¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,;;;
;;;ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,¤º°`°º¤;;;

 
欢迎评论/批评和建议,
 

布莱金斯。拉链

stevesfr 发表于 2022-7-6 06:25:56

可能应该提到的是,为了让程序利用输入文件中的任何属性,要插入的块必须具有属性,否则只有普通块才能在x、y、z处插入。
只有我的20美分。

Lee Mac 发表于 2022-7-6 06:28:54

 
是的,但我认为很明显,属性将只在属性块中输入。。。但也许你是对的/:眨眼:

flopo 发表于 2022-7-6 06:45:02

有没有人用lisp从带有点坐标的txt、excel或csv文件中绘制三维多段线?谢谢

Lee Mac 发表于 2022-7-6 06:56:54

 
Flopo-这与您发布它的线程无关。

nelsnelson 发表于 2022-7-6 06:58:16

除了在特定坐标和属性处导入块外,有谁能帮我在代码中添加一个功能,使块也可以具有x、y和z比例集,也可以从TXT或CSV中进行设置?

Bhull1985 发表于 2022-7-6 07:14:43

哈,2009!
谢谢李,现在我可以试试这个,而不是我的坏块替换脚本
页: [1]
查看完整版本: 批块插入器