PSDS Labeling and attributes

Hi

we are customising our Design Series XM and we want to have the attribute Spec automatically selected by the program according to the process system. For that we wrote in the pipattr_EDS the following:

PIPE,XXXX,,,,\
 SPEC,\
  "Piping class:",31,"#",\
     "QUERY DISTINCT JobSpec using system,contract order by 1",\
 Y,,USER

Where JobSpec is the table name and system and contract are the names of the table fields and at the same time the name of the attributes given before. XXXX is the name of the piping component.( such as PIPE; PELB; PELX, etc.)

We have the problem that when we change the system the spec is not automatically changed in the attribute  window allthough only one value results from the query. The window shows the old value. In order to update it we have to click on the value and select the only one possibility. If we do not so the old value remains and you have chosen the wrong speb.

W4e have set the value of the variable DS_EDIT_ATTRIBUTE_AUTOMATICALLY_SET_DEPENDENT to 1, but it also did not work.

In order to avoid that we changed the property override_allowed from Y to N. In this case the attribute Spec is automatically changed when we change the system, but when we select the command "place pipe on IL" we receive an error message which makes reference to a rule. No element is placed on the IL.

Can anyboby help us with this problem and tell us what we are doing wrong?

 

Thanks

Leon

  • Hi Leon;

    Sorry for the late reply.

    What are the APP_FLAG settings for the SPEC attribute?  I don't think APP_FLAG is used in an overlay attribute file (in this case pipattr_EDS), so you may need to make sure there is an 'A' in the APP_FLAGS section for the ATTRDEFN.

    There are two potential entries depending on what you want to see:

    • A = Automatically set single value
    • H = do not display the attribute if only one value
      exists for that attribute

    I checked an XM build I have on a VM, and it appears that there are no APP_FLAGS on SPEC in a default install, so I would try settting that first.

    Hope that helps,

    Mark

  • Hu Mark,

    Thank you for your reply. I've tried your tip, but it did not work aas expected. That means the resultts are the same as in the case that the APP_FLAG setting is left without any value. Question : is the SPEC attribute a special attribute within PSDS?.

    Thanks for your help.

     

    Leon

  • Leon;

    The SPEC attribute is somewhat special in that it affects so many other attributes, however from a functional standpoint inside of the label mechanism, it is really just another label, so the APP_FLAGS setting should work.  Perhaps it may be related to the type of database you are using and whether or not the query is case sensitive.  There's a couple things you can try:

    First, open your projvars.cfg file and make sure that the line with DS_KEY_WRITE_ATTR_TO_LOG=F4 is not commented out.  Hitting F4 during a Label Edit or Read dialogue box will write a psAttrs.log file to the $(PS_TEMP) folder.

    Perform a Label Read on one of the components, and hit F4.  Then navigate to the folder defined in $(PS_TEMP) and open the psAttrs.log file and search for SPEC.  You should have a line similar to this:

    30: SPEC: CS150
    SELECT DISTINCT SPEC FROM PIPE_PIPE_SPEC ORDER BY 1

    Depending on your database, you should be able to cut and paste this into a query tool for your database (such as Toad for Oracle, or Management Studio for SQL Server).  Run it, and then see what is returned, and also what CASE it is in, as sometimes a database can be case-sensitive, so "cs150" will not be equal to "CS150".  Make sure that the spec name returned matches the spec name in the spec tables.

    Other than that it is difficult to debug this type of thing from a distance.  If you are still having trouble with this, then feel free to email me, and I can try to recreate it on my side.

    Cheers,

    Mark