Jump to content

Changing some lines in a Lisp file


delta

Recommended Posts

I'm farily new to writing lisp, but I'll give you my opinion.

 

You can add multiple commands to a lisp, giving you the options you want. I would add a seperate command for each FFL you were referring to.

 

Insertit.lsp

;;------------------------------------------------------------;;
;;  152ffl            ;;
;;------------------------------------------------------------;;
(defun c:152ffl ()
(on_hold)
)
(defun on_hold ()
(sp_inset)
(if(/= tm_ssget nil)
(command "_.erase" tm_ssget "")
)
(command "_.ucs" "")
(setvar "cecolor" "8")
(if(tblsearch "BLOCK" "DwgBOMBlockTableRecord3")(command "_.insert" "152FFL"
(list (* -10 real_scale) (* 12.5 real_scale)) real_scale real_scale 0))
(sp_outset)
)
;;------------------------------------------------------------;;
;;  185ffl            ;;
;;------------------------------------------------------------;;
(defun c:185ffl ()
(on_hold)
)
(defun on_hold ()
(sp_inset)
(if(/= tm_ssget nil)
(command "_.erase" tm_ssget "")
)
(command "_.ucs" "")
(setvar "cecolor" "8")
(if(tblsearch "BLOCK" "DwgBOMBlockTableRecord3")(command "_.insert" "185FFL"
(list (* -10 real_scale) (* 12.5 real_scale)) real_scale real_scale 0))
(sp_outset)
)
;;------------------------------------------------------------;;
;;  200ffl            ;;
;;------------------------------------------------------------;;
(defun c:200ffl ()
(on_hold)
)
(defun on_hold ()
(sp_inset)
(if(/= tm_ssget nil)
(command "_.erase" tm_ssget "")
)
(command "_.ucs" "")
(setvar "cecolor" "8")
(if(tblsearch "BLOCK" "DwgBOMBlockTableRecord3")(command "_.insert" "200FFL"
(list (* -10 real_scale) (* 12.5 real_scale)) real_scale real_scale 0))
(sp_outset)
)

Edited by jonathann3891
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...