View Full Version : pid-sup.lsp
Data Wrangler
08-10-2006, 10:01 AM
Has anyone done any addition to this file? I would like to add some functionality to the program and I need to find some documentation on the variables and subroutines.
Specifically, I would like the ability for the save command to save a drawing twice - once as per normal, updating the database, and a copy saved to an alternate folder with some layers turned off.
This is to support the corporate document control system.
Derek
Hi Derek. I have never personally tried to add functionality to the pid-sup file before though I am pretty sure it can be done. If you do a search in here on pid-sup.lsp you will find a bunch of posts about it. cheers.
Data Wrangler
11-14-2006, 10:57 AM
This has come back to the front burner... I am adding some routines to ap.lsp, and would like to know if anyone has some insight on the internal functions and what they can do for me... specifically, is there a function that is similar to at_Env_getIni that can read the current project.ini file?
Thanks
Derek
I don't know enough to answer that question Derek. My question is: Will there be a pid-sup.lsp in XM?
PeterJ
11-15-2006, 12:43 PM
Put this lisp in your pid-sup.lsp (or better, in a custom lisp file that you load from the pid-sup.lsp) and you'll be able to get info from project.ini with a command like
(setq currlingua (readini "lingua"))
In project.ini, you must have a line like
lingua = IT
;;;-----------------------------------------------------------------------------------------------------------
;;; function to read value from project.ini
;;;-----------------------------------------------------------------------------------------------------------
(defun readini (var / )
(print "info from project.ini")
(setq varlen (strlen var))
(IF ( at_asi_read_tab "PROJECT" (list (list "PROJ_ID" (at_asi_get_projid) ) ) '("PROJ_PATH"))
(progn
(setq projdirname (substr (car (cadr( at_asi_read_tab "PROJECT" (list (list "PROJ_ID" (at_asi_get_projid) ) ) '("PROJ_PATH")))) 12 ))
(setq refname (strcat (at_Env_getIni "GENERAL" "approjdb") projdirname "PROJECT.INI"))
(SETQ LINE "t")
(setq fil (findfile refname))
(if fil
(progn
(setq f (open fil "r"))
(WHILE (NOT (null (SETQ LINE (read-line f))))
(if (eq (read (substr line 1 varlen)) (read var))
(setq result (substr line (+ 2 varlen)))
)
)
)
(progn ;no
(princ (strcat "\nCould not find file " refname ". " ))
)
)
(close f)
(print "info from project.ini--------done")
)
(setq result nil)
)
RESULT
)
PeterJ
11-15-2006, 12:44 PM
yes, XM will have pid-sup.lsp
Data Wrangler
11-15-2006, 01:04 PM
You ARE the man, Peter! I will put this in and try it out in a little while.
I was perusing Bentley's web site, and in the developer resources ran across the SELECT developer application. I'm going to try and get signed up for the developer network. Maybe they have more documentation there that would be useful.
Derek
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.