usprecast Posted November 24, 2014 Share Posted November 24, 2014 I was able to get help to get this command. First I wanted to insert a block as a lisp command. What i wanted was to be able to type FH and bring that block that i want to the location that i wanted and I was able to that with this lisp command: (defun C:FH () (command "_.insert" "fire hydrant-dyn") ) Now what I want to do is bring this block to scale 1 because right is bring it to scale 0 and I also want it to be on the layer that i have already created. ( I already have a template with layers and block and trying to make it simple for to insert blocks to different location because sometimes I have a big job with a lot of miles and i don't want to go back to the begining to copy and paste 5 miles down the road) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted November 24, 2014 Share Posted November 24, 2014 Welcome to CADTutor . Something along this ? NOTE: Change the layer name in the program as show below in pink color . (defun c:test (/ p) ;; Tharwat 24.11.2014 ;; (if (tblsearch "BLOCK" "fire hydrant-dyn") (while (setq p (getpoint "\n Specify point to locate block < fire hydrant-dyn >:" ) ) (entmake (list '(0 . "INSERT") (cons 10 (trans p 1 0)) '(2 . "fire hydrant-dyn") (cons 8 [color=magenta]"Layername"[/color]) '(41 . 1.0) '(42 . 1.0) '(43 . 1.0) ) ) ) (princ "\n Block name < fire hydrant-dyn > is not found in drawing !!" ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 25, 2014 Share Posted November 25, 2014 An enhacement would be to have a look up table so when you enter "fire hyrdrant-dyn" it auto goes on the layer "FIRE HYD" A better way would be to use tool palettes and pick the fire hydrant and as part of the hidden macro it would go on the correct layer or as we do use slide libraries. Quote Link to comment Share on other sites More sharing options...
ttray33y Posted November 25, 2014 Share Posted November 25, 2014 Tool Palettes will do the trick, no need for lisp Quote Link to comment Share on other sites More sharing options...
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.