PDA

View Full Version : Process # Change



HybridAWD
12-12-2006, 12:20 PM
When changing a process line number, simply type CA, then P for process then edit the line.

Is there something to modify the command so we don't have to press P? I have a co-worker who keeps forgetting to press P and if you dont, it gives you the unhandled exception error. Much less to say, he flips out lol. Any insight? Maybe a sticky note on his monitor?

PeterJ
12-12-2006, 01:19 PM
Put following lisp in your pid-sup.lsp (or your user lisp file that gets loaded for P&ID). Use CP instead of CA for process lines.
This will open the dialog that allows editing the tag. It will also update annotations on all runs after modifying the tag.


(DEFUN C:CP ( )
(while (setq iObject2 (car (at_msc_entselun (at_msg " Select process line , return when done:" 3))))
(setq iEnt2 (attget iObject2))
(princ ient2)
(if (setq iEnt2 (attget iObject2)) ;if 2 // iEnt2 is entiteitsnaam van linkpoint v/d run
(progn
(setq iEnt3 (attget ient2)) ;if 2 // iEnt3 is entiteitsnaam van linkpoint v/d process line
(setq keyt (at_asi_get_keytag ient3))
(setq ttyp (car (cadr( at_asi_read_tab "TAG_REG" (list (list "KEYTAG" keyt ) ) '("TAG_TYPE") ) ) ) )
(at_asi_dcl_modkey keyt ttyp)
(setq listpt (get_xdta ient3 -17001))
(setq listhd (mapcar 'cdr listpt))
(foreach n listhd
(PROGN
(PRINT "UPDATING....")(PRINC N);
(asiregen_ent (cdr (car (entget (handent n) '("*")))) allflag t)
(at_asi_upd_dwgatt (cdr (car (entget (handent n) '("*")))) allflag)
(int_define (cdr (car (entget (handent n) '("*")))))
)
)
)
)
)
)

HybridAWD
12-13-2006, 06:18 AM
now when inserting that in the pid_sup.lsp, is there a certain spot to insert it? I've never put anything in there, I've modified before, just never added anything.

dave
12-13-2006, 06:24 AM
I'm pretty sure you can insert it anywhere. Just don't insert it in the middle of another routine. Of course, make a copy of your pid-sup before you try. :)

HybridAWD
12-13-2006, 06:24 AM
yeah i already made a copy, Ill throw it in at the bottom and see what happens