Jump to content

Recommended Posts

Posted
Lee, this was exactly it! I dont know why but i assumed that these were variables used in the deleteblocks code and then given a value by selecting blocks in the drawing later on.

 

However, typing in the name of the block i needed right into the code works brilliantly. Thank you very much Sir. I aspire to understand Lisp on your level some day.

 

Excellent - I'm delighted to hear that the program is working well for you. :)

 

p.s. - I cant seem to figure out how to edit a reply that i have already made. Still quite green here.

 

No worries - this may be a restriction imposed by your low post count - certain actions are not possible until you exceed 10 posts.

  • 7 years later...
Posted

Hi guys, I used this program for some time now and it works perfectly! (Thanks Lee) But now I have something that might relate to this but does not work for my precise needs. I have a Dynamic Block, a "Issued For Construction" stamp that has multiple different text that I can switch to fit my needs. One of them is "In Progress" which I use with the other stamp. Both are the same block that I copied and just change the visibility, so when I use this program, it removes both stamps. Is there a way to make it so I can choose the visibility, or maybe a selection on the drawings since all the stamps are at the same place on every drawings (more than 300+ .dwg) Thanks

image.png.30ca405491e9f1669038344cd61dd042.png

Posted (edited)

First step is get Lee-mac's dynamic block functions. These allow you to reset a visibility state via lisp. The simplest way to change the block for multi dwgs would be using a script. Open dwg load a lisp save and close. It may be possible with OBDX so no need to graphically open the dwg, the 3rd is use Aeccorconsole much like OBDX but can be set up as a batch process over an entire directory.

 

Ok need effective block name, is it in multiple layouts, visibilty names. So a dwg would be best  for us to look at.

 

Something like this to do task.

(defun insdyne (blkname / pt obj lst ans)
(if (not LM:setdynpropvalue )(load "Lee-mac Dynamic block get-put"))
(if (not AH:Butts)(load "Multi Radio buttons.lsp"))
(setq obj (vlax-ename->vla-object (car (entsel "\nPick a dynamic block "))))
(setq visval (LM:getvisibilityparametername obj))
(setq lst (LM:getdynpropallowedvalues obj visval))
(setq lst (cons "Please choose" lst))
(if (not AHbut)(setq AHbut 1))
(setq ans (ah:butts 1 "v"  lst))
(LM:SetVisibilityState obj ans)
(princ)
)

Lee-mac Dynamic block get-put.lsp

Edited by BIGAL

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...