AutoLISP - Adding DXF code 48 to entities....

AutoLISP - Adding DXF code 48 to entities....

eelrod
Contributor Contributor
955 Views
4 Replies
Message 1 of 5

AutoLISP - Adding DXF code 48 to entities....

eelrod
Contributor
Contributor

Hello, I'm realitively new to AutoLISP.

 

What I would like to do is change certain entity's linetype scale override with LISP.  The problem I'm having is that if an entity's LTScale is the default, it has no LTScale override and no DXF code 48 to modify with entmod.

 

Is there a way to add DXF code 48 to an entity?

 

Thank you kindly!

0 Likes
Accepted solutions (1)
956 Views
4 Replies
Replies (4)
Message 2 of 5

hmsilva
Mentor
Mentor
Accepted solution

Try

 

(if (assoc 48 ent)
   (entmod (subst (cons 48 3) (assoc 48 ent) ent))
   (entmod (append ent (list (cons 48 3))))
)

 

Hope this helps,
Henrique

EESignature

Message 3 of 5

scot-65
Advisor
Advisor
In lieu of CONS, try APPEND.

(entmod (append d1 (list (cons dfx new))))

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 4 of 5

eelrod
Contributor
Contributor

Thank you, that is exactly what I needed!

0 Likes
Message 5 of 5

hmsilva
Mentor
Mentor

@Anonymous.elrod wrote:

Thank you, that is exactly what I needed!


You're welcome, evan.elrod
Glad I could help

Henrique

EESignature

0 Likes