0 Members and 1 Guest are viewing this topic.
yeah, your starting to talk about things i dont have a clue about. lisp is something that i can manipulate to get what i want but starting from scratch is something i struggle very hard with.
;;first select a text object(setq obj (car (entsel "\nSelect text object to chnage alignment for: ")));;next get the entity list(setq ent (entget obj));;also get the VLA-Object(setq obj (vlax-ename->vla-object obj));;now we'll find the properties we need to use;;first using the assoc codes that we know from the DXF reference(setq insPt-DXF (cdr (assoc 10 ent));;insertion point alignPt-DXF (cdr (assoc 11 ent));;alignment point justH-DXF (cdr (assoc 72 ent));;horizontal justificatio justV-DXF (cdr (assoc 73 ent));;vertical justification );;now well do the same thing ActiveX style(setq inspt-VLA (vlax-get obj 'insertionpoint);;insertion point alignPt-VLA (vlax-get obj 'textalignmentpoint);;alignment point just-VLA (vlax-get obj 'alignment);;unlike DXF, the H & V are combined );;now, ignoring my comments, which way is easier to read what it is you are retreiving?;|and now let's assume that the text object is Left justified so we won't need to worry about the alignment property or textalignmentpoint.....and we'll move the text 5 units up and 10 units to the right, first via standard lisp and then by ActiveX|;(setq newinspt-DXF (list (+ 10.0 (car insPt-DXF))(+ 5.0 (cadr insPt-DXF)) (caddr inspt-DXF)))(setq newEnt (subst (cons 10 newinspt-DXF) (assoc 10 ent) ent))(entmod newent);;now with Activex, the first step is pretty much identical(setq newinspt-VLA (list (+ 10.0 (car insPt-VLA))(+ 5.0 (cadr insPt-VLA))(caddr inspt-VLA)))(vlax-put obj 'insertionpoint newinspt-VLA)
the reason i want to know is i would like to create a lisp routine to change the justification of text but have it stay in its current location.
HiHow about AutoCAD's built-in command ._JustifyTextHave a good one, Mike
Quote from: Oak3sthe reason i want to know is i would like to create a lisp routine to change the justification of text but have it stay in its current location.HiHow about AutoCAD's built-in command ._JustifyTextHave a good one, Mike
And what version of acad did that become available?
im using 2002 and had no idea