Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/11/2022 in all areas

  1. You're welcome. You either wrap the value as a string ( with two quotes ) or keep it as value and both should work because the command call accepts both. e.g: (setq co 0,0) ;; or the following (setq co "0,0") (command "-insert" "BSL_L6" co "100" "" "")
    1 point
  2. Remove the two quotes around the variable to enable the command to evaluate it.
    1 point
  3. I just did something similar and just have a list of company names that appears in a list box so select client, it then pops a new box with that clients title block options like A1, A1-por,A3 etc then asks how many and makes all the new layouts with that client title block. All the title blocks are in one master dwg so just use layout to select from a dwg.
    1 point
  4. updated the lisp with the following - entmake for point and text (faster) - got rid of nth its slower then then car cadr caddr last - updated while to combined lines of code Also I don't think the easting and northing are in the right order but left it like the lisp had it. so if your points are in the wrong spot maybe update to below (setq POINT (list (cadr POINT_LINE) ;Get x (caddr POINT_LINE) ;Get y (last POINT_LINE) ;Get z ) ) ; POINTPLT is a simple AutoLSIP program that will plot a coordinate points file ; in AutoCAD. To run POINTPLT, load POINTPLT.LSP as you would any normal ; AutoLISP file (see AutoCAD Reference Manual), type "POINTPLT" and press ; [Enter]. POINTPLT will first prompt you for an input coordinate filename. ; You must enter a vaild DOS filename at this point. The input coordinate file ; must be in the following format: ; ; POINT NO. NORTHING(y) EASTING(x) ELEVATION(z) ; ; A sample input coordinate file (SAMPLE.DAT) is included with POINTPLT. ; ; POINTPLT uses the default (current) text style and layer. However, the ; current text style must have a defined height (height must not be "0"). ; ; If you have any questions or comments concerning POINTS, I may be reached ; via THE SPECTRUM BBS þ (501) 521-5639 ; ;------------------------------------------------------------------------------- ; * ERROR Trapping * ; (defun *ERROR* () (eop) ) ;------------------------------------------------------------------------------- ; * End of program * ; (defun EOP () (setvar "CMDECHO" POINTSPLT_CE) (princ) ) ;------------------------------------------------------------------------------- ; * Main Program * (defun C:POINTPLT (/ IN_FILE POINT_LINE POINT_NO POINT) (setq POINTSPLT_CE (getvar "CMDECHO")) (setvar "CMDECHO" 0) ;Turn "Command Echo" off (prompt "\n\nP O I N T P L T v1.0 -- Copyright (c) 1992 by Kurtis J. Jones / -Mate Software\n\n") (setq IN_FILE (open (getfiled "\nEnter points filename: " (getvar 'DWGPREFIX) "txt" 16) "r")) (while (setq POINT_LINE (read (strcat "(" (read-line IN_FILE) ")"))) ;Read POINT_LINE from input file (setq POINT_NO (car POINT_LINE)) ;Get the point number (prompt (strcat "\nPlotting point no. " (itoa POINT_NO))) (setq POINT (list (caddr POINT_LINE) ;Get easting (cadr POINT_LINE) ;Get northing (last POINT_LINE) ;Get elevation ) ) (entmake (list '(0 . "POINT") (cons 10 POINT))) (entmake (list '(0 . "TEXT") (cons 10 POINT) '(40 . 1) (cons 1 (itoa POINT_NO)))) ) (close IN_FILE) (prompt "\nPOINTPLT finished") (prompt "\n ") (eop) )
    1 point
  5. (setq IN_FILE (open (getfiled "\nSelect Points File" (getvar 'DWGPREFIX) "txt" 16) "r")) This will start in the same folder as the drawing change "txt" to the file extension your looking for. --edit-- I would also make sure to the file is formatted correctly. when I make a point its asking for x y z cords in that order but the lisp seems to be pulling P# y x z. Also Im on BrisCAD so i had to update the text command to work properly
    1 point
×
×
  • Create New...