alanhuro
12th May 2005, 04:49 pm
Hi
I need your help. I tried to automate the process of changing the title block but now I stuck with modify the variable. I was able to use the command -attedit to to change the file name but everytime I have to provide the exact value before to change to different value. Since each drawing has a different file name so I can not write an lsp script to do it for every page. I look for an althernative that is to change the entity of that block. The script is use is this
(setq mysset (ssget)) ;Grap the object from draw
(setq ObjPropertyList (entget (ssname mysset 0))) ;assign the object list to variable
REsult:
((-1 . <Entity name: 18144c8>) (0 . "INSERT") (330 . <Entity name: 18134f8>) (5 . "C21") (100 . "AcDbEntity") (67 . 0) (410 .
"Model") (8 . "0") (100 . "AcDbBlockReference") (66 . 1) (2 . "FORMAT") (10 0.0 0.0 0.0) (41 . 1.0) (42 . 1.0) (43 . 1.0) (50
. 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0) (210 0.0 0.0 1.0))
The problem is I can not find any group code that storing a string of a file name. I try to explorer deeper for group code 330 to see if the string is store in there or not
(setq TextEntity (cdr (assoc 330 ObjPropertyList))) ;pull the entity 330 from an object list
(setq ObjPropertyList2 (entget TextEntity)) ; check what inside
But still I only receive crap from that. I check all the entity name from 330 but still have not found a string that I can manipulate.
Can you help me find a way to pull out the string store in an object. thank a lot for your help.
Alan
I need your help. I tried to automate the process of changing the title block but now I stuck with modify the variable. I was able to use the command -attedit to to change the file name but everytime I have to provide the exact value before to change to different value. Since each drawing has a different file name so I can not write an lsp script to do it for every page. I look for an althernative that is to change the entity of that block. The script is use is this
(setq mysset (ssget)) ;Grap the object from draw
(setq ObjPropertyList (entget (ssname mysset 0))) ;assign the object list to variable
REsult:
((-1 . <Entity name: 18144c8>) (0 . "INSERT") (330 . <Entity name: 18134f8>) (5 . "C21") (100 . "AcDbEntity") (67 . 0) (410 .
"Model") (8 . "0") (100 . "AcDbBlockReference") (66 . 1) (2 . "FORMAT") (10 0.0 0.0 0.0) (41 . 1.0) (42 . 1.0) (43 . 1.0) (50
. 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0) (210 0.0 0.0 1.0))
The problem is I can not find any group code that storing a string of a file name. I try to explorer deeper for group code 330 to see if the string is store in there or not
(setq TextEntity (cdr (assoc 330 ObjPropertyList))) ;pull the entity 330 from an object list
(setq ObjPropertyList2 (entget TextEntity)) ; check what inside
But still I only receive crap from that. I check all the entity name from 330 but still have not found a string that I can manipulate.
Can you help me find a way to pull out the string store in an object. thank a lot for your help.
Alan