PDA

View Full Version : snapunit and girdunit



dblue
01-08-2007, 08:56 PM
every time when i creat the new file of P&id , AutoplantP&id let me define the snap value , i would like to pre-set the snapunit and gridunit at the starting-up a new file but where is the place that i can modify.
still the same question with the drawing limits.

Packin31
01-09-2007, 04:25 AM
DBLUE,

Take a look at these files?

C:\Bentley\Plant 2004\P&ID\sym: PIDSET1, PIDSET2 or PIDSET4.

In addition, I think the border you select (Metric, Imperial etc.) has to do with what PIDSET gets selected by the program.

Aplant Monkey
01-09-2007, 06:38 AM
you can also set it up in the PID_SUP. we have it load a separate LISP from the PID_SUP that controls all the general setting like snap and grid

dblue
01-09-2007, 06:03 PM
in fact i had re-set the pidset1~4.dwg, still can not be pre-set, and i edit the pid_def.dbf file ,it just only can set the text height and bubble radius. Hope someone can tell me where the P&ID get the snap value grid value and drawing limits.

dave
01-09-2007, 06:08 PM
monkey, can someone who is NOT you post that lisp? OR send it to someone you know and they will post it. B)

Aplant Monkey
01-10-2007, 05:54 AM
see what I can do

Aplant Monkey
01-10-2007, 06:39 AM
The more I think about it I am not sure this is what you want, but this is what we do anyways. In the PID_SUP we tell AP to load up a separate LISP routine that controls the basic settings of each drawing. There is also a way to do it in the PID_SUP but I can't remember where it is at this point... I will keep looking. attached is part of the routine that we load that controls the basic settings. I have changed the drive names and clients names to protect the innocent. ;) Hope this works for you

PeterJ
01-10-2007, 07:09 AM
-The pidset dwg's are used to store data about scale, textheight etc in a drawing. You'll find them in a p&id at the 0,0 location on layer MC-ATT.
Editing these files is not advised
-The pid_def.dbf is used to store the last used values for title border, scale, text-height, metric/mixed metric/imperial etc so it can be re-used for the next drawing. You can edit this file to change parameters for the next drawing you create, but if you select other values, the content of the file will be overwritten. Also, the file is on the local drive ... (unless you put it in the custom directory)
-When a new drawing is created, a routine in pid-sup.lsp will retreive the parameters from pid_def.dbf. You can change this to fixed values by changing the inspset2 function

f.e. (metric values)
(defun inspset2 ( / p1)
(setq p1 (at_def_read_rec (strcat wdrive (apunit t) pdelim "pid_def") "pidset2"))
(command "_.INSERT" (at_fi_symname "pidset2") "0,2.0" "0.01" "" ""
(quote "2")
(quote "5")
(quote "5")
(quote "5")
(quote "2.5")
)
)

dave
01-10-2007, 12:45 PM
(command "_.INSERT" (at_fi_symname "pidset2") "0,2.0" "0.01" "" ""
(quote "2")
(quote "5")
(quote "5")
(quote "5")
(quote "2.5")
)
)

(command "_.INSERT" (at_fi_symname "pidset2") "0,2.0" "0.01" "" "" - is that the coordinates of the dialog box?

dblue
01-10-2007, 06:01 PM
Thanks PeterJ and AplantMonkey
Does the pid_def.dbf can control the limits value?
follow the PeterJ it can set the limits and text height.
(quote "0.1" ) ;; Text Height
(quote "0.25") ;; ID Bubble Radius
(quote "0.25") ;; Instrument Mark Spacing
(quote "0.1") ;; Global Scale Factor
(quote "0.05") ;; Snap Value
)
(command "limits" "0,0" "34,22") ; Sets limits to titleblock size
(setvar "textsize" 0.1) ;; Sets text size to 0.1"
)