Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ P&ID

Add Custom Lisp Routines to AVEVA P&ID

  • Last UpdatedMar 14, 2024
  • 1 minute read

Lisp routines can be added to "acaddoc.lsp" located at the Bin folder of the standard installation.

Below is an example of a lisp routine supplied with version 6.1.0.16 that creates the command "ai_selall" which selects every entity in the active drawing.

;;;----------------------------------------------------------------------------

; New "Select All" function. Cannot be called transparently.

(defun c:ai_selall ( / ss old_error a b old_cmd old_hlt)

(setq a "CMDECHO" b "HIGHLIGHT"

old_cmd (getvar a) old_hlt (getvar b)

old_error *error* *error* ai_error)

(if (ai_notrans)

(progn

(princ "Selecting objects...")

(setvar a 0)

(setvar b 0)

(command "_.SELECT" "_ALL" ""); Create Previous SS

(setvar a old_cmd)

(setvar b old_hlt)

(setq ss (ssget "_P"))

(sssetfirst ss) ; Non-gripped, but selected (someday!)

(princ "done.\n")

)

)

(setq *error* old_error nil ss nil)

(princ)

)

Some sample lisp programs are supplied in the BIN folder of the standard installation.

WARNING: Lisp routines that modify intelligent entities in AVEVA P&ID drawings could potentially corrupt entities and drawings as a consequence.

Related Links
TitleResults for “How to create a CRG?”Also Available in