Lee Mac Posted December 6, 2009 Posted December 6, 2009 I realise that this is quite a simple program as coding goes, but it has been requested more times than I can remember, so I thought I'd try to write a half decent one. So here goes... All instructions are in the header, will read txt or 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. ;; ;;...............................................................................;; ;; ;; ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;; ;; ;; ;;;¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,;;; ;;;ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,¤º°`°º¤;;; Comment/Criticism and Suggestions are Welcome, Lee BlkIns.zip Quote
stevesfr Posted December 6, 2009 Posted December 6, 2009 I realise that this is quite a simple program as coding goes, but it has been requested more times than I can remember, so I thought I'd try to write a half decent one. So here goes... All instructions are in the header, will read txt or 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. ;; ;;...............................................................................;; ;; ;; ;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;; ;; ;; ;;;¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,;;; ;;;ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,¤º°`°º¤;;; Comment/Criticism and Suggestions are Welcome, Lee Probably should mention that in order for the program to utilize any attributes in the input file, the block to be inserted must have attributes, or else only the vanilla block gets inserted at x,y,z. just my 2cents. Quote
Lee Mac Posted December 6, 2009 Author Posted December 6, 2009 Probably should mention that in order for the program to utilize any attributes in the input file, the block to be inserted must have attributes, or else only the vanilla block gets inserted at x,y,z.just my 2cents. True, but I thought it was pretty obvious that the attributes will only be entered in an attributed block... but maybe you're right/ :wink: Quote
flopo Posted December 7, 2009 Posted December 7, 2009 Does anybody has a lisp for drawing a 3dpolyline from a txt, excel or csv file with points coordinates? Thanks! Quote
Lee Mac Posted December 7, 2009 Author Posted December 7, 2009 Does anybody has a lisp for drawing a 3dpolyline from a txt, excel or csv file with points coordinates? Thanks! Flopo - this is unrelated to the thread in which you have posted it. Quote
nelsnelson Posted September 15, 2013 Posted September 15, 2013 In addition to importing blocks at specific coordinates and with attributes, could anyone help me add a functionality to this code such that blocks can have x-, y-, and z-scale set as well, also from the TXT or CSV? Quote
Bhull1985 Posted September 16, 2013 Posted September 16, 2013 Hah, 2009! Thanks Lee now I can try this instead of my bad block replace script Quote
Recommended Posts
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.