Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum ISO19650 store procedure
    • Sign In

    • State Suggested Answer
    • Replies 4 replies
    • Answers 2 answers
    • Subscribers 61 subscribers
    • Views 183 views
    • Users 0 members are here

    ISO19650 store procedure

    Luc Poulin
    Offline Luc Poulin 1 month ago

    Hello

    Is there a help file from Bentley that describe all the stored procedures deploy under  ISO19650 ?

    Example: EXEC ISO19650_new_attributes '$EDIT#fi_type_code$','$EDIT#CDE_STATE$','Status'

    • Sign in to reply
    • Cancel
    Parents
    • Anderson Mancebo
      0 Offline Anderson Mancebo Wed, Oct 18 2023 9:36 AM

      Hi Luc,

      All procedures have kind of "same way" to work, only the Version Increment is more complicated.

      They will be based on the LPK environments values.

      Let me try to explain:

      ISO19650_new_attributes will return the list of attributes based on parameters:

      PROCEDURE CALL: EXEC ISO19650 '[TYPE]','[CDE STATE]','[FILTER]' 

      All parameters values will be based on lkp_pw_attributes environment attributes values

      • [TYPE] : This will be your PW_CODE value, based on this, the final statement will search for MODEL, DRAWING or DOCUMENT
      • [CDE STATE]: For ISO could be WIP, EARLY_P, PUBLISHED, SHARED
      • [FILTER]: Could be any filter that you have. In you example, Status

      So, if your procedure call be:

      EXEC ISO19650_new_attributes 'DR','WIP','Status':

      First the procedure will run a statement to define if it is a  MODEL, DRAWING or DOCUMENT:

      SET @model = (SELECT pw_model FROM lkp_pw_attributes WHERE PW_CODE = 'DR' and PW_FILTER = 'Type')
      SET @drawing = (SELECT pw_drawing FROM lkp_pw_attributes WHERE PW_CODE = 'DR' and PW_FILTER = 'Type')
      SET @document= (SELECT pw_document FROM lkp_pw_attributes WHERE PW_CODE = 'DR' and PW_FILTER = 'Type')

      Based on the values, will do:

      IF @typecode IS NULL OR @typecode = ''
      SELECT ''
      ELSE
      IF @model = 1
      SELECT pw_code, pw_description FROM lkp_pw_attributes WHERE pw_model = 1 AND pw_filter = 'Status' AND cde_state = 'WIP' ORDER BY pw_sortorder
      ELSE
      IF @drawing = 1
      SELECT pw_code, pw_description FROM lkp_pw_attributes WHERE pw_drawing = 1 AND pw_filter = 'Status' AND cde_state = 'WIP' ORDER BY pw_sortorder
      ELSE
      IF @document = 1
      SELECT pw_code, pw_description FROM lkp_pw_attributes WHERE pw_document = 1 AND pw_filter = 'Status' AND cde_state = 'WIP' ORDER BY pw_sortorder
      ELSE
      SELECT pw_code, pw_description FROM lkp_pw_attributes WHERE pw_filter = 'Status' AND cde_state = 'WIP'  RDER BY pw_sortorder

      Returning the values.

      I hope it helps

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    • Luc Poulin
      0 Offline Luc Poulin Wed, Oct 18 2023 9:52 AM in reply to Anderson Mancebo

      Thank you Anderson

      Yes that help, 

      I saw others stored procedure with other argument, like  "3". I was able to deduce  it set the level to look at.

      I spot another argument that has T or D as a value. Find this by luck as I was browsing for more information.

      Any chance we can have a central document that list all of them with explanation and the possible arguments value?

      At least the first part which is exposed to us. The last part ( the store procedure itself) is not expose to us. Useful to know but we are not able to change anything

      Much appreciate your  response

      Have  a good day

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Luc Poulin
      0 Offline Luc Poulin Wed, Oct 18 2023 9:52 AM in reply to Anderson Mancebo

      Thank you Anderson

      Yes that help, 

      I saw others stored procedure with other argument, like  "3". I was able to deduce  it set the level to look at.

      I spot another argument that has T or D as a value. Find this by luck as I was browsing for more information.

      Any chance we can have a central document that list all of them with explanation and the possible arguments value?

      At least the first part which is exposed to us. The last part ( the store procedure itself) is not expose to us. Useful to know but we are not able to change anything

      Much appreciate your  response

      Have  a good day

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    • Anderson Mancebo
      0 Offline Anderson Mancebo Wed, Oct 18 2023 10:25 AM in reply to Luc Poulin

      Unfortunately I don't know any document of this. But those are my notes:

      ISO19650_action_names '[USERNAME], '[TRIGGER]','[RETURN TYPE] '

      Values on lkp_user_attributes

      [USERNAME] :  I.E. 'Jonh Doe'

      [TRIGGER] : If 1, execute

      [RETURN TYPE]: 'I' for Initials and 'T' for Title Block

      ISO19650_user_names '[USERNAME], '[SEPARATOR]','[RETURN TYPE] '

      [USERNAME] :  I.E. 'Jonh Doe'

      [SEPARATOR] : Separator like space, dot ...

      [RETURN TYPE]: 'I' for Initials and 'T' for Title Block

      ISO19650_attributes '[TYPE CODE] ','[PW_ FILTER] '

      Similar as ISO19650_new_attributes without CDE STATE

      ISO19650_root_folder_attribute '[VAULT] ','[TARGET LEVEL]','[PROPERTY TYPE] '

      [VAULT]: Currently folder number (system variable)

      [TARGET LEVEL]: Depth of you want (0 for root, 1 for first ...)

      [PROPERTY TYPE]: 'n' for folder name and 'd' for folder description

      ISO19650_user_date return date in YYYY-MM-DD format

      wreIncrementVersionNumber '[OPERATION]',[CURRENT VERSION]'

      [OPERATION]: INC_MAJ, INC_MIN, REMOVE_MIN, PUB

      [CURRENT VERSION]: 'P01.1', 'A1', 'B4' ...

      For the revision, I suggest you to test all operation types

      You are not able to change any of one. But based in you work process, you will need some changes and also have a justification. You can open a SR asking about all the changes, but I don't know about all the steps. 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    • Luc Poulin
      0 Offline Luc Poulin Wed, Oct 18 2023 11:00 AM in reply to Anderson Mancebo

      Thank you @anderson

      This will be usefully

      Already propose few things.

      Here one that I feel could be useful for the community

      https://pwdi.ideas.aha.io/ideas/PWDI-I-412

      The idea is to retain the type of the Work Area Type when retrieving an attribute.

      This could help reduce the use of the store procedure and will give us more flexibility when the folder we retrieve the info,  is not always locate 3rd level down ( for example).

      Fell free to vote for it :-)

      Thank's again for the reply

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies