Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/02/2019 in all areas

  1. Since your variables are global (as you have not declared them as local to the function c:azi), they will be defined within the document namespace and will therefore be accessible by any other AutoLISP program whilst the drawing remains open. Here is a basic example to demonstrate this principle: (defun c:test1 ( ) ;; Variable 'x' is global (setq x (getint "\nEnter a number for variable 'x': ")) (princ) ) (defun c:test2 ( ) (if (null x) (princ "\nPlease run 'test1' first.") (princ (strcat "\nx * 2 = " (itoa (* x 2)))) ) (princ) )
    1 point
  2. The '(62 . #) is the index color. Make this change for blue: '(62 . 5)
    1 point
  3. As @rkmcswain mentioned you could do something like so: (if (setq p1 (getpoint "\nPunto Inicial:")) (progn (setq p2 (polar p1 (* 1.5 pi) 0.18)) ;; (command "line" p1 p2 "") (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p2) '(62 . 2))) ) )
    1 point
  4. You could change your current layer to a layer that is yellow before creating the line. You could use (entmake) instead of (command) and set the color during creation time. (sample below) You could run (command "._change) after (command ._line") and change the color of (entlast) to yellow, or move it to a yellow layer. (setq p1 (getpoint "\nPunto Inicial:")) (setq p2 (polar p1 (* 1.5 pi) 0.18)) (entmake (list (cons 0 "LINE") (cons 8 "0") (cons 62 2) (cons 10 p1) (cons 11 p2) ) )
    1 point
  5. A script open dwg1 do something do something close Y open dwg2 do something do something close Y open dwg3 do something do something close Y
    1 point
  6. Do some homework about using SCRIPTS you will find your answer is actually very simple.
    1 point
×
×
  • Create New...