|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > Database > GetSortedUIDListForProcessing |
available from build: 20230714 |
Given a list of unique_ids, this command returns the same list sorted in the suitable priority to be released/checkedin/checkedout.
call DBWShell("GetSortedUIDListForProcessing uidList mode [showLinkedDrawings [checkForeignDocuments [NoTraverseChildren [NeverReturnLinkedDocuments]]]] ")
uidList |
A comma separated list of document unique_id to be processed |
|
|---|---|---|
mode |
0: Checkout |
|
showLinkedDrawings |
Optional. |
|
checkForeignDocuments |
Optional. |
|
NoTraverseChildren |
Optional. |
|
NeverReturnLinkedDocuments |
Optional. |
Please note the command is based on the core processing of the DocumentSelectorDialog that is shown during recursive revision actions.
@SORTED_UID_LIST |
a comma separated list of unique_ids in the proper order to be processed for the mode action. |
ShowDocumentSelectorDialog command
sub Main()
DBWInit(TRUE)
if (okDBW) then
selection = "11548,11542,11543" 'input document unique id list to sort
mode = "2" '0=checkout, 1=checkin, 2=approve
showLinkedDrawings = "1" '0/1 exclude/include any linked drawing
CheckForForeignDocuments = "0" '0/1 include/exclude the document if foreign
NoTraverseChildren = "0" '0/1 allow/avoid the recursion through all children
NeverReturnLinkedDocuments = "1" '0/1 include/exclude linked documents (e.g. configs)
'SORT LIST
DBWShell("GetSortedUIDListForProcessing " & selection &_
" " & chr(34) & mode & chr(34) &_
" " & chr(34) & showLinkedDrawings & chr(34) &_
" " & chr(34) & CheckForForeignDocuments & chr(34) &_
" " & chr(34) & NoTraverseChildren & chr(34) &_
" " & chr(34) & NeverReturnLinkedDocuments & chr(34))
selection = DBWResult("@SORTED_UID_LIST")
DBWMsgBox selection
end if
End sub