@rapidcad here is the block that i referred to in my private message to you.
i would post the compiled code here as well, to get help from the rest of the community, but i do not want to cross any developer boundaries with Mr. Lee Mac, as it is a (VERY BUTCHERED) compilation of his codes from his website on dynamic blocks.
For anyone else that is dying to have a mental breakdown... here is a rundown of what I'm trying to accomplish. (i just copied the comments from the code compilation that i referenced earlier) Or if you have a BETTER idea or simpler solution, I am open to suggestions. Thank you!!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; thanks to Lee Mac for his code modules that i found at:
;; http://lee-mac.com/dynamicblockfunctions
;; but I need help with this code to get it to work for me, please & thank you
.
;; i would like to compile the following functions into ONE routine
;; to be able to reference different block handles and text objects. that will
;; change the visibility state of the referenced block.
;; these are the handles for the objects in the dwg that i am currently working on so i will
;; use them for reference:
;; dynamic block (handle: "10f9c")
;; text object value to reference for the "SET DYNAMIC BLOCK VISIBILITY STATE"
;; to change the visibility state of the block:
;; (handle: "113a0")
;; (the magenta text in the drawing is a text field that references the content
;; of the blue text in the drawing.
;; (handle: "1139b")
;; the text object that represents the visibility state of the block will be changed in an
;; Excel spreadsheet, so that when the AutoCAD operator opens the dwg, all fields, visibility states,
;; and other information will be updated automatically so that all that they have to do is print
;; the drawings.
;; the magenta text is the determining value for the final visibility state of the dynamic block.
;; when it changes, so does the visibility state of the dynamic block.
;; i would like the "processing part" of the code to be defined to a function that i can
;; use with another block to achieve the same results within the same dwg, and the
;; reference field object to be a variable that i can change to the reflect the visibility state
;; of a different block with it's own piece of text.
;; everything below this line to be a compiled into one function, i.e. "BkVz"
;; (see bottom of page for more notes.)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CODE COMPILATION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; everything above this line (or whatever is relevant) compiled into one function "BkVz"
;; that i can apply to the handle of any number of different dynamic blocks to get the
;; visibility state of a block that is referenced by its handle and set it to the value
;; of the text object referenced by ITS handle.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; bkTxt (this is where i would put the handle or necessary info for the text to
;; be referenced for the dynamic block i want to apply the "BkVz function to.)
;; basically the "BkVz" function would get the visibility state of a block based on its handle
;; and change it to the value of "bkTxt".
;; i may not have the proper syntax or wording for this, but this is somewhat of what i'm looking for:
;; (setq Bk1 (handent "10f9c")
;; (setq bkTxt1 (handent "113a0")
;; defun (BkVz1 (Bkvz (Bk1) : this will run all of the functions above "BkVz" for the variable set as Bk1
;; (bkTxt1 (bkTxt (handent "113a0") : this is the text reference that will change the visibility state
;; this will get and set the visibility state of the referenced block
;;; (setq Bk2 (handent "2xxx")
;; (setq bkTxt2 (handent "xxx2") : etc. etc.
;; or create a list of ALL dynamic blocks within the drawing and a list of all of the
;; text reference items that can somehow have the visibility state of the block
;; cross referenced to the corresponding value of the field text.
;; Bk1, Bk2, Bk3, etc.
;; bkTxt1, bkTxt2, bkTxt3, etc.
;; all of this would be run automatically without ANY USER INPUT OR ACTIONS necessary.
;; the text object that represents the visibility state of the block will be changed in an
;; Excel spreadsheet, so that when the AutoCAD operator opens the dwg, all fields, visibility states,
;; and other information will be updated automatically so that all that they have to do is print
;; the drawings.
;; so in laymens terms, which i am by FAR, the conversation would go like this:
;; "I have a problem." (dynblocks that need to change their visibility state)
;; "I've got a tool to fix it, althought I'm not entirely sure how to apply it" (AutoLISP function)
;; "I want to take my tool and apply it to the problem, but I would also like to be able to
;; reuse this tool over and over again applying it to several more problems, withouth having to
;; make a new tool. if my thought process, syntax, or methods are wrong, feel free to correct,
;; modify, or suggest changes at will.
;; i do not expect you to "write" the code for me, but i have very little knowledge of
;; AutoLISP so if you could put notes or comments beside the things that i need to change
;; in order to get it to work that would be greatly appreciated.
;; example : (blk) <-- change all instances of this to "???"
;; example : (viz) <-- change all instances of this to "???" etc. etc.
;; THANK YOU!!!!!!