Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.cad.autocad AutoLISP FAQ (part 2/2) - samples, code
Section - [22] Block Attributes

( Part1 - Part2 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Forum ]


Top Document: comp.cad.autocad AutoLISP FAQ (part 2/2) - samples, code
Previous Document: [21.8] How to write XYZ data of selected objects to a file?
Next Document: [23] Polylines
See reader questions & answers on this topic! - Help others by sharing your knowledge
[22.1] How to access block attributes?

  Check all subentities after the INSERT until the attribute is found.
  See http://xarch.tu-graz.ac.at/autocad/stdlib/STDENT.LSP

  ;;; returns entget-list of attribute attname (STRING) in element ele
  ;;; or nil if not found
  (defun ATTELE (ele attname / rslt)
    (if (and (istypep ele "INSERT")
             (= (getval 66 ele) 1))
      (progn
        (setq ele (entnext (entity ele)))
        (while (istypep ele "ATTRIB")
          (if (= (strcase (getval 2 ele)) (strcase attname))
            (setq rslt (entget ele) ele nil)      ;break the loop
            (setq ele (entnext ele))))))
    rslt
  )

  ;;;Example:
  (attele (entsel) "TEST")   ; returns entget-list of
                             ; attribute "TEST" if the block has it

  BTW: Even trickier functions to get entities DXF group codes are
       GET and EDLGETENT by Vladimir Nesterowsky.
  ;;;Sample calls:
  ;;; return list of 2,1 and -1 group values
  (defun GET-ATTRIBS-LOOK-UP (block-ename)
    (get '(2 1 -1) (cdr (edlgetent block-ename))))

  (defun ALL-VERTICES-AND-BULGES (pline-ename)
    (get '(10 42)  (cdr (edlgetent pline-ename))))

  available at http://members.tripod.com/~vnestr/

------------------------------

[22.2] How to MODIFY block attributes? DATESTAMP.LSP

  For a very simple DATESTAMP.LSP simply entmod the entget-list 
  of the DATE attribute in your plotstamp block, retrieved from 
  (attele) as above.

  ;;; change the attribute value of INSERT ele to new (group 1)
  (defun ATTCHG (ele attname new / b)
    (if (setq b (attele ele attname))
      (entmod (subst (cons 1 new) (getval 1 b) b))))

  ;;; Change all DATESTAMP attributes in all inserted PLOT* blocks
  (defun C:DATESTAMP ()
    (ssmap            ;fixed by Alan Williams, wrong arg order
     '(lambda (ele)
        (attchg ele "DATESTAMP" (today))
        (entupd ele)
      )
      (ssget "X" '((0 . "INSERT")(2 . "PLOT*")))))
  ;;;return todays date, could be a DIESEL or this string conversion
  (defun TODAY (/ s)
    (setq s (rtos (getvar "CDATE") 2))  ;gets the julian date
    (strcat (substr s 5 2) "-" (substr s 7 2)"-"(substr s 3 2)))

  Automatic datestamps are normally done with either RTEXT 
  (bonus/express tools) or HPCONFIG with a HPGL/2 plotter. (<a2000i)

------------------------------

[22.3] How to UPDATE block attributes?

  There exists a support/ATTREDEF.LSP to update attribute properties
  (position, layer, ...) for already inserted blocks.

  On complex entities you must (entupd) the header entity, to see
  the update on the screen (forces an element REGEN).

  ;;; Example:
  (setq s (getstring "Change Attribute to: "))
  (attchg (attele (setq b (entsel "of block: ")) s)))
  (entupd (car b))        ; the block, not the attribute

  ;;; some more helper funcs to get the main entity of any attribute
  ;;; or vertex
  (defun MAIN-ENTITY (ele)
    (setq b (entity b))   ;force ENAME
    (while (istypep b '("ATTRIB" "ATTDEF" "VERTEX"))
      (setq b (entnext b)))               ;loop until no more sub-ents
    (if (istypep b '("SEQEND" "ENDBLK"))
      (getval -2 b)                       ;complex entity -> header
      b                                   ;normal entity
    )
  )

------------------------------

[22.4] How to ENTMAKE a Block Complex Entity in AutoLISP

   See http://xarch.tu-graz.ac.at/autocad/stdlib/ENTMAKE.LSP or 
   http://www.autodesk.com/support/techdocs/td30/td301515.htm (broken)
   There is an example how to use multiple calls to (entmake) to create
   the block header, the entities, closes the block and finally
   (entmake) the INSERT.
     For anonymous blocks beware that only
   (setq bn (entmake '((0 . "ENDBLK")))) returns the blockname for
   (entmake (list '(0 . "INSERT")'(70 . 1)(cons 2 bn) ...))

User Contributions:

1
Mar 17, 2023 @ 5:17 pm
Regardless if you believe in God or not, read this message!!!

Throughout time, we can see how we have been carefully conditioned to come to this point where we are on the verge of a cashless society. Did you know that the Bible foretold of this event almost 2,000 years ago?

In the book of Revelation 13:16-18, we read,

"He (the false prophet who deceives many by his miracles--Revelation 19:20) causes all, both small and great, rich and poor, free and slave, to receive a mark on their right hand or on their foreheads, and that no one may buy or sell except one who has the mark or the name of the beast, or the number of his name.

Here is wisdom. Let him who has understanding calculate the number of the beast, for it is the number of a man: His number is 666."

Referring to the last generation, this could only be speaking of a cashless society. Why so? Revelation 13:17 states that we cannot buy or sell unless we receive the mark of the beast. If physical money was still in use, we could buy or sell with one another without receiving the mark. This would contradict scripture that states we need the mark to buy or sell!

These verses could not be referring to something purely spiritual as scripture references two physical locations (our right hand or forehead) stating the mark will be on one "OR" the other. If this mark was purely spiritual, it would indicate both places, or one--not one OR the other!

This is where it comes together. It is amazing how accurate the Bible is concerning the implantable RFID microchip. Here is information from a man named Carl Sanders who worked with a team of engineers to help develop this RFID chip:

"Carl Sanders sat in seventeen New World Order meetings with heads-of-state officials such as Henry Kissinger and Bob Gates of the C.I.A. to discuss plans on how to bring about this one-world system. The government commissioned Carl Sanders to design a microchip for identifying and controlling the peoples of the world—a microchip that could be inserted under the skin with a hypodermic needle (a quick, convenient method that would be gradually accepted by society).

Carl Sanders, with a team of engineers behind him, with U.S. grant monies supplied by tax dollars, took on this project and designed a microchip that is powered by a lithium battery, rechargeable through the temperature changes in our skin. Without the knowledge of the Bible (Brother Sanders was not a Christian at the time), these engineers spent one-and-a-half-million dollars doing research on the best and most convenient place to have the microchip inserted.

Guess what? These researchers found that the forehead and the back of the hand (the two places the Bible says the mark will go) are not just the most convenient places, but are also the only viable places for rapid, consistent temperature changes in the skin to recharge the lithium battery. The microchip is approximately seven millimeters in length, .75 millimeters in diameter, about the size of a grain of rice. It is capable of storing pages upon pages of information about you. All your general history, work history, criminal record, health history, and financial data can be stored on this chip.

Brother Sanders believes that this microchip, which he regretfully helped design, is the “mark” spoken about in Revelation 13:16–18. The original Greek word for “mark” is “charagma,” which means a “scratch or etching.” It is also interesting to note that the number 666 is actually a word in the original Greek. The word is “chi xi stigma,” with the last part, “stigma,” also meaning “to stick or prick.” Carl believes this is referring to a hypodermic needle when they poke into the skin to inject the microchip."

Mr. Sanders asked a doctor what would happen if the lithium contained within the RFID microchip leaked into the body. The doctor replied by saying a terrible sore would appea (...)

Comment about this article, ask questions, or add new information about this topic:




Top Document: comp.cad.autocad AutoLISP FAQ (part 2/2) - samples, code
Previous Document: [21.8] How to write XYZ data of selected objects to a file?
Next Document: [23] Polylines

Part1 - Part2 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
rurban@xarch.tu-graz.ac.at (Reini Urban)





Last Update March 27 2014 @ 02:11 PM