error: bad DXF group: ((1 2.61126))

Jaybo

Usenet Archive
Joined
Sep 16, 2003
Messages
2
Reaction score
0
I am writing a litle routine to update our room tags w/ the area of the room.

I'm using entmod to update the assoc of the room tag attribute. But it seems that the a2 value needs to be in quotes...?

Does not work:
(setq new (subst (list (cons 1 a2)) val partlst))

If I change a2 variable to the actual area value (at the time) "2.61126" everything is peachy.

Works:
(setq new (subst (list (cons 1 "2.61126" a2)) val partlst))

...also if you find that my code isn't clean or theres an easier way of doing things, I'm open to suggestion as it's been a while since I've written a routine...
Thanks in advance.
 
Hi,

just removing the (list) from your (cons) should do it...

(setq new (subst (cons 1 a2) val partlst))

hth
 
Thanks Ruul - But the "list" was just part of the troubleshooting (has no effect either way). I forgot to take it out before I posted...
 
Thanks Ruul - But the "list" was just part of the troubleshooting (has no effect either way). I forgot to take it out before I posted...

hmpf...
:-/
ok

0) use local variables
1) why (command "list") ?
2) the area is obviously calculated before entering the routine-as you like
3) filter your inserts (ssget '((0 . "INSERT")(66 . 1)))

and

4) http://tinyurl.com/nlli
5) http://tinyurl.com/nlll

hth
 
(setq a2 (getvar "area")) returns a real value, attributes are strings. (setq a2 (rtos (getvar "area"))) is a start.

Jaybo said:
I am writing a litle routine to update our room tags w/ the area of the room. I'm using entmod to update the assoc of the room tag attribute. But
it seems that the a2 value needs to be in quotes...?
Does not work:
(setq new (subst (list (cons 1 a2)) val partlst))

If I change a2 variable to the actual area value (at the time)
"2.61126" everything is peachy.
Works:
(setq new (subst (list (cons 1 "2.61126" a2)) val partlst))

...also if you find that my code isn't clean or theres an easier way
of doing things, I'm open to suggestion as it's been a while since I've written a routine...
 
Just the other day I heard:
"It takes a simple one to simplify a simple thing." <g>
 

Member Recommended

QuickCAD 8
Price
–
Change
–
Autocad "Lite" RobbieB ·
Data Converters
Price
$103
Change
0%
Back
Top