Author Topic: Edit attribute values  (Read 277 times)

0 Members and 2 Guests are viewing this topic.

mohan

  • Newt
  • Posts: 24
Edit attribute values
« on: November 20, 2019, 12:33:00 PM »
Another small lisp........

I have to Attribute blocks

1. Block name say ATTRIBUTE1 having TAG names
TITLE_1:RRRRRRR
TITLE_2:WWWWW
TITLE_3:HHHHHH
DRAWN:SJ
DESIGNED:DJB
CHECKED:DJB
APPROVED:GAB
DWG_NO:123456
DATE:NOVEMBER 2019

*Select all the block name of ATTRIBUTE1 & change the tag values as above (I can modify in the lisp TAG Names, Block names or the Values as per my requirements)


2. Block name say ATTRIBUTE2 having TAG names
REV_NO:01
DESCRIPTION:YYYYYYYY
DRAWN:SJ
DESIGNED:DJB
CHECKED:DJB
APPROVED:GAB
DATE:NOV 2019

*Select all the block name of ATTRIBUTE2 & change the tag values as above (I can modify in the lisp TAG Names, Block names or the Values as per my requirements)
No inputs just run the lisp with defun command

thanks
"Save Energy"

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9282
Re: Edit attribute values
« Reply #1 on: November 20, 2019, 02:47:20 PM »
Are you interested in learning to write a program to do this?
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--

mohan

  • Newt
  • Posts: 24
Re: Edit attribute values
« Reply #2 on: November 21, 2019, 01:05:29 AM »
I started learning AutoLisp Program, time is the problem - doing a Job with cooking & other Misc. things at home
If you share a easy understanding pdf tutorial of AutoLisp - that will be much grateful

I wanted to Learn only how to use (run) the approved codes of below Programs
Visual Basic Customization
.NET
ObjectARX

thanks
"Save Energy"

BIGAL

  • Bull Frog
  • Posts: 356
  • 30 + years of using Autocad
Re: Edit attribute values
« Reply #3 on: November 21, 2019, 01:23:40 AM »
Please be careful a Block has attributes,
Each attribute has a "TAG NAME"
For any individual attribute it has a "Attribute value"

It gets confusing what your trying to do using "TAG" all the time in request a dwg or image would explain better.
A man who never made a mistake never made anything

mohan

  • Newt
  • Posts: 24
Re: Edit attribute values
« Reply #4 on: November 21, 2019, 02:04:02 AM »
Can you Fix this Lisp please! or help me with a script

Code: [Select]
(defun c:attrimedit (nil)
  (setvar 'cmdecho 0)
  (c:gatte)
  (foreach x '(("_.BLOCK" "Ren Drawing Title" "DATE" "       NOVEMBER  2019" "YES")
               ("_.BLOCK" "Ren Drawing Title" "REV_NO1" "A" "YES")
       ("_.BLOCK" "Ren Tittleblock Revision" "REV_NO" "A" "YES")
               ("_.BLOCK" "Ren Tittleblock Revision" "REV_DESC" "     ISSUED FOR CONSTRUCTION" "YES")
               ("_.BLOCK" "Ren Tittleblock Revision" "DATE" "NOV'  2019" "YES")
      )
    (eval (cons 'command-s x))
  )
  (setvar 'cmdecho 1)
  (princ)
)

thanks
"Save Energy"

BIGAL

  • Bull Frog
  • Posts: 356
  • 30 + years of using Autocad
Re: Edit attribute values
« Reply #5 on: November 25, 2019, 12:21:02 AM »
Again a dwg or image would explain better.
A man who never made a mistake never made anything