|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > Plot > PlotAll |
Plots all the documents of the selected list (for the Documents Page) or of the actual Query list (for the Query page) using the setup parameters.
If a file name is specified, plots all drawings retrieved from it.
call DBWShell("PlotAll [list_file_name [ silent [ allowDuplicatedEntries ]]]")
list_file_name |
Optional. file containing the full path name of the documents to be plotted. |
|---|---|
silent |
Optional. [0/1] |
allowDuplicatedEntries |
Optional. [0/1] |
If no parameter is passed, MechworksPDM browser must be open and DocumentsPage or QueryPage must be active
This command plots all type of documents providing they're record in the DOCUMENT table.
E.g. you cannot print PDF attachments since they're registered in a separated table named DBW_ATTACHMENT.
Please note for plotting GENERIC documents it's necessary to program the OnPlotG.LST script.
More, the followings options control the command behavior:
options → PlotSetup
Plot only drawings
Additional drawing file extensions to be managed
Never plot frozen documents
This example shows how to plot a list of files belonging to a working set. Files to plot are included in a .txt file and they are passed by a different system. You choose the file by a dialog.
Sub Main()
Dim fso
Dim Part
Dim WSHShell
filefilter ="TXT|*.txt|"
filefiltertitle ="select the plot listing file"
filefilterroot ="C:\temp\"
Set fso = CreateObject("Scripting.FileSystemObject")
DBWinit(TRUE)
choosenFile = DBWSelectFile( filefilterroot, filefilter )
if choosenFile="" then
exit sub
end if
uids = ""
Set ts = fso.OpenTextFile( choosenFile , ForReading)
Do While ts.AtEndOfStream <> True
line = ts.ReadLine
id = DBWGetIdfromFullFileName( DBWDirNameFromFullName(line) , DBWFileNameFromFullName(line), uid )
if uids="" then
uids = uid
else
uids = uids & "," & uid
end if
Loop
ts.Close
call DBWShell("OpenForBrowsing")
call DBWShell("WorkingSetCreate " & uids )
call DBWShell("PlotAll")
end sub
In this case you can specify the list file name in the command line. This avoids the procedure of choosing the
DBWShell("PlotAll C:\MyPlotListFiles\plotlist.txt")
and this is an example of the file plotlist.txt
M:\MySwArchive\Drawings\50029906.SLDDRW
M:\MySwArchive\Drawings\52029905.SLDDRW
M:\MySwArchive\Drawings\53029903.SLDDRW
M:\MySwArchive\Drawings\55029201.SLDDRW