PDA

View Full Version : Help with Custom Control Valve Body



infilcolee
11-01-2011, 07:15 AM
I am having a tough time creating a new custom Control Valve Body in SS3. I have done this before in SS2. I feel like the concept should be the same. The only help documents that I have from Bentley are old Rebis documents and I don't think they are helping.

I have a custom Globe Valve symbol that works fine as a manual valve. What I am trying to do now is add this same symbol to the Control Valve list and use it in all future P&ID's. I have been able to add this option to the list but when I place the symbol I get this error on the command line:

ERROR bad argument type: numberp: nil

I have never really understood what this error means. I have received it before.

Any help would be greatly appreciated.

PeterJ
11-02-2011, 01:56 AM
This is a lisp error, AutoCAD expects a number (numberp), but gets 'nothing' (nil = nothing, it is not 0). Can you post your list -best would be the complete list- for review ?

The REBIS docs should still be relevant, the p&id software has hardly changed in the 10 last years or so.

infilcolee
11-02-2011, 05:33 AM
This is the cval_body section of my lisp file:

;; sldcod descript symbol
cval_body (list (list "GAT" (at_msg "Gate" "PID_1299" 0) "GATE" )
(list "BAL" (at_msg "Ball" "PID_1300" 0) "BALL" )
(list "GLO" (at_msg "Globe" "PID_1301" 0) "GLOBE" )
(list "BUT" (at_msg "Butterfly" "PID_1302" 0) "BFLY" )
(list "ANG" (at_msg "ISA Angle" "PID_1303" 0) "ANG" )
(list "3WY" (at_msg "ISA 3 Way" "PID_1304" 0) "3WAY" )
(list "4WY" (at_msg "ISA 4 Way" "PID_1305" 0) "4WAY" )
(list "2WO" (at_msg "Angle" "PID_1306" 0) "OANG" )
(list "3WO" (at_msg "3 Way" "PID_1307" 0) "O3WAY" )
(list "4WO" (at_msg "4 Way" "PID_1308" 0) "O4WAY" )
-----> (list "OGLOBE" (at_msg "NO Globe Valve" "PID_1309" 0) "oglobe" )

The last record that I have marked by an arrow is the custom valve symbol that I have attempted to add. This symbol also exists in my custom folders 'sym' folder. I am not sure what the incrementing PID_XXXX number is referring to though.

PartRidge
11-02-2011, 06:33 PM
I think the restriction is in the first section of the identifier after the (list. Correct me if I'm wrong Peter, but doesn't the system expects only a 3 character identifier inside the double quotes? So "OGLOBE" should actually be "OGL"? If it sees more than 3 characters it doesn't know what to do and typically throws the ERROR Bad Argument Typ

infilcolee
11-03-2011, 05:43 AM
I switched the identifier to a 3 letter notation. The valve now places fine in the P&ID. I don't even use the Slide option so this was something that I easily overlooked. Thanks for the help PartRidge.

PeterJ
11-03-2011, 05:51 AM
correct solution !

some of the programming in AP P&ID still goes back to the DOS era, hence the limitation on the 8 character file name.