Hi all,
I was trying to add a point as extended data to a block.
Therefor i used this data but i get an error every time:
(setq lastent (entget (CAR (entsel)))) (regapp "list") (setq exdata '((-3 ("list" (1011 . 3277.82) (1021 . 5782.5) (1031 . 369.5) ) ) ) ) (setq newent (append lastent exdata) ) (entmod newent)
Can somebody tell me what went rong?
Regards
Thomas
Assuming the DXF codes are capable of supporting double value types, you aren't creating a list of dotted pairs. I think the XDATA identifier also needs a DXF code. You'll need a single-quote on the list if the first element is intended to be the string "list", or use the (list... ) function to construct one on the fly.
Maybe this can help
(setq e (entlast))
(entmod (list (cons -1 e) '(-3 ("list" (1011 . 3277.82) (1021 . 5782.5) (1031 . 369.5)
))))
southie
I player around a litle whit my function but still can't find the problem.
When i set the list of items i want to add as folows it works perfect
(setq exdata ; Sets the variable '((-3 ("list" ; exdata equal to the (1041 . 3203.59) ; new extended data— (1041 . 1106.68) (1041 . 0.0) ) ) ) )
But if i want to use group code 1011 (world space position) it doesn't work.
When i want to use it i get the error:
; error: bad DXF group: (-3 ("aansluitingen" (1011 . 3203.59)))
(setq exdata ; Sets the variable '((-3 ("list" ; exdata equal to the (1011 . 3203.59) ; new extended data— (1021 . 1106.68) (1031 . 0.0) ) ) ) )
And this is the complete code i use now:
(setq lastent (entget (car (entsel)))) ; Gets the association ; list of definition data ; for the last entity. (regapp "list") ; Registers the ; application name. (setq exdata ; Sets the variable '((-3 ("list" ; exdata equal to the (1011 . 3203.59) ; new extended data— (1021 . 1106.68) (1031 . 0.0) ) ) ) ; in this case, a text ) ; string. (setq newent (append lastent exdata) ) ; Appends new data list to ; entity's list. (entmod newent) ; Modifies the entity with the new ; definition data.
Regards
Thomas
P.S.: thanks for olready looking at the problem
Can't find what you're looking for? Ask the community or share your knowledge.