I am wondering if there is a way to edit the wdio.lsp file so that the it moves the DESCxx attribute position to 1/4" to the right of the right rung when installing output cards using the PLCIO Utility. I have the input cards working properly but cannot get the output cards to match.
I have noticed that within the wdio.lsp file it only moves the DESCxx attribute 1 text height beyond the right hand bus and I am hoping this can be modified to move it 1/4"
Please help!!
Thank you,
Paul E Barkholz
Solved! Go to Solution.
Solved by PatMurnen_Adsk. Go to Solution.
Paul,
So the output cards are already moving the text all the way over to the right of the bus but just not the amount you want, right?
I haven't done much with this but I think the code is in this section shown in blue in the wdio.lsp and the lines I've marked red are the ones to change -
(defun wd_wdio_move_attrib ( at_en newx newy / ; ** 09-Feb-06 NEHolt added "newy"
delta_x old10 old11 newed ed
new10 new11
thgt ;** 14-Sep-04 PanQ, Declare to local
)
; Relocate attribute "at_en" to x value (if newx not "nil") or y value (if not "nil")
(if Aw_debug (princ "\nIN:wd_wdio_move_attrib"))
(setq ed (entget at_en))
(setq thgt (cdr (assoc 40 ed)))
(setq old10 (cdr (assoc 10 ed)))
; ** 09-Feb-06 NEHolt
(if newx
(progn
(setq delta_x (- newx (car old10))) ; calc move distance to the right-hand bus
(setq delta_x (+ delta_x thgt)) ; go one text height distance beyond the right-hand bus
; Calc new DESCxx attribute position
(setq new10 (list (+ (car old10) delta_x) (cadr old10) 0.0))
(setq old11 (cdr (assoc 11 ed)))
(setq new11 (list (+ (car old11) delta_x) (cadr old11) 0.0))
)
; ELSE
(if newy
(progn
(setq delta_y (- (cadr old10) newy) ) ; calc move distance down to the bottom bus
(setq delta_y (+ delta_y thgt)) ; go one text height beyond the bottom bus
; Calc new DESCxx attribute position
(setq new10 (list (car old10) (- (cadr old10) delta_y) 0.0))
(setq old11 (cdr (assoc 11 ed)))
(setq new11 (list (car old11) (- (cadr old11) delta_y) 0.0))
) ) )
Can you just change those lines to
(setq delta_x (+ delta_x 0.25))
(setq delta_y (+ (+ delta_y 0.25))
Regards,
Pat
Pat,
That did the trick, thank you very much!! I really need to learn autolisp programming!
Paul
Paul,
glad it worked. The wdio.lsp can get pretty complicated but once you find the right place to modify the Autolisp code itself isn't too cryptic.
Regards,
Pat