AutoCAD Electrical General

Reply
Active Member
pbarkholz
Posts: 7
Registered: ‎03-19-2013
Message 1 of 4 (268 Views)
Accepted Solution

Move the plc DESCxx attribute to .25 inch beyond the right bus in PLCIO utility

268 Views, 3 Replies
03-19-2013 11:27 AM

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

Paul E. Barkholz
Employee
murnenp
Posts: 522
Registered: ‎08-01-2007
Message 2 of 4 (244 Views)

Re: Move the plc DESCxx attribute to .25 inch beyond the right bus in PLCIO util

03-19-2013 01:03 PM in reply to: pbarkholz

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 Murnen
Principal Content Developer
Information Modeling and Platform Products Group

Autodesk, Inc.

Active Member
pbarkholz
Posts: 7
Registered: ‎03-19-2013
Message 3 of 4 (226 Views)

Re: Move the plc DESCxx attribute to .25 inch beyond the right bus in PLCIO util

03-20-2013 04:46 AM in reply to: murnenp

Pat,

 

That did the trick, thank you very much!!  I really need to learn autolisp programming!

 

Paul

Paul E. Barkholz
Employee
murnenp
Posts: 522
Registered: ‎08-01-2007
Message 4 of 4 (220 Views)

Re: Move the plc DESCxx attribute to .25 inch beyond the right bus in PLCIO util

03-20-2013 05:36 AM in reply to: pbarkholz

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



Pat Murnen
Principal Content Developer
Information Modeling and Platform Products Group

Autodesk, Inc.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New AutoCAD Electrical Category!

The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.

Ask the Community