PDA

View Full Version : Valve annotation



EnzO
12-14-2006, 01:31 AM
Hello everyone. I have a question that need help.
It is about the annotation.
1. I want to annotate the valve's Tag_No in PID. I try to add my script to pid-sup.lsp as follow:

(defun ValveMark_Tag ()
(STRCAT VCODE "-" VNUM )
)

but PID prompts :
ERROR (x_ent) Insufficient number of arguments.

ERROR ADS Wrong Request

Or is there anyway to do this annotation?


2. I want to annotate the LineNum two rows, like this:
ltag "-" pspec
psz "-" pins
for example:
1001-CS10
80-30

How can I do this?

PeterJ
12-14-2006, 12:02 PM
Enzo, Did you take any customizing training on P&ID ? What you ask here is possible and is normally part of the customizing. If you know your way around in the software, I can explain this in a few words, but I don't want to start giving free training through this forum.

HybridAWD
12-14-2006, 12:05 PM
As for the Valve question,

Do you simply use a certain "code" for the valve prior to the number?

We use "V" as a prefix and then input the proper # of the valve. So in Project Admin. I also attached a picture of how our project admin is setup. Maybe that will help you out some, Im not sure.

For the Line ID, that is a tough question. I would imagine it would be possible by setting it up in the PID_SUP.LSP, but ill have to do a little more research about adding another row.

EnzO
12-14-2006, 05:17 PM
Enzo, Did you take any customizing training on P&ID ? What you ask here is possible and is normally part of the customizing. If you know your way around in the software, I can explain this in a few words, but I don't want to start giving free training through this forum.

Hi Peter,thank you in advance.
Maybe I did not describe my question clearly. I know a way to display the Valve tag, I can create relationships between the textblock and the valve key word.(like the image). but it is inconvenient. I have to do this for each Valve. So I want to add a function like Miscellaneous > Annotation > Line ID , but I 'm not good at programming.

EnzO
12-14-2006, 05:19 PM
As for the Valve question,

Do you simply use a certain "code" for the valve prior to the number?

We use "V" as a prefix and then input the proper # of the valve. So in Project Admin. I also attached a picture of how our project admin is setup. Maybe that will help you out some, Im not sure.

For the Line ID, that is a tough question. I would imagine it would be possible by setting it up in the PID_SUP.LSP, but ill have to do a little more research about adding another row.

Thank you for your help.

dave
12-14-2006, 11:51 PM
I can explain this in a few words, but I don't want to start giving free training through this forum.

but it's christmas!! :)

PeterJ
12-18-2006, 10:32 AM
EnzO,

you can create a lisp function and define that as an 'embedded' function in an attribute. The attribute will then show the result of the lisp routine in stead of the associated database field.
A nice example is the (valve_size) routine that is linked to the vsize/psz field , allowing the valve size to be shown in a specific way when the valve is linked to 2 or more pipe runs.

If you define your lisp routine like
(defun ValveMark_Tag ( / )
(setq myvcode (car (cadr ( at_asi_read_tab "VALVE" (list (list "KEYTAG" (at_asi_lastkey) ) ) '("VCODE") ) ) ) )
(setq mynum (car (cadr ( at_asi_read_tab "VALVE" (list (list "KEYTAG" (at_asi_lastkey) ) ) '("VNUM" ) ) ) ) )
(STRCAT myVCODE "-" myVNUM )
)


and define that as embedded value for the TAG_NO field in the AT_HVALVE view, you don't need to change any attributes.

-for embedded value :
-project admin / select project / select database / select at_views
-select AT_HVALVE view / Edit / Fields-tab / select TEG_REG_B / select TAG_NO / press edit and place (ValveMark_Tag) in the 'embedded' field

Happy X-mas

Data Wrangler
01-17-2007, 09:34 AM
Peter-

This may help me out in our customization. We use four fields as our tag number, but only display 2 of them on the drawing with a note covering the other fields i.e. "PREFIX ALL TAGS WITH "00-QC"."

The only problem we have by doing this is that to put a tag on the valves with 2 fields requires us to use the annotation tool, an additional step. I'm going to play with this and see if your description will allow us to do this automatically.

Oh - we had admin training with one of the Bentley guys last week, and he spoke highly of you. I believe he used some of your graphics in his powerpoint presentation, in fact.

Thanks

Derek

dave
01-17-2007, 09:50 AM
Was the trainer Carl Brock?

Data Wrangler
01-17-2007, 09:57 AM
No, it was Mr. Abu-Nafiseh, out of Atlanta.

Derek

Data Wrangler
04-05-2007, 06:41 AM
Peter-

I have use the 'embedded code' tip above with good success on a few projects. Unfortunately, the client has changed the project spec and wants to see all of the fields that make up the tag number. I tried removing the embedded function from the AT_Views, but apparently the function call is embedded in the objects themselves. How do I update the drawings/objects so that that call is removed?

Derek

PeterJ
04-05-2007, 08:05 AM
just change the lisp routine so it shows all the fields

Data Wrangler
04-05-2007, 09:56 AM
Hmmm... I was hoping you weren't going to tell me to put a bandage on the wound, instead of healing it. I would much rather take the drawings back to their original state, but if that is the best way forward...

Thanks.

Derek

PeterJ
04-05-2007, 01:33 PM
If you leave the routines in, it allows you to dynamically change the display if the client changes his mind again ...
If you want to remove the routines, then delete the functions from your lisp and remove the reference in the views.

Data Wrangler
04-06-2007, 06:41 AM
I had already tried what you suggested, but when you open a drawing that had the embedded code working, it comes up with a list of "unknown variable errors", with the name of the embedded function being the name of the variable.

Derek

Data Wrangler
04-06-2007, 06:43 AM
The reason I want to take the project drawings back to a clean set is that we do a lot of exchanging, and I didn't want to have to rely on the embedded code always being there.

thanks

Derek