Have you mapped also variables to pdf files? Can you save data to pdf data card?
yes i have
Using the SW Task addin you have the ability to copy / paste variable values from one file to another. This is especially useful if you are automatically converting models to PDF using the approval process, as it automates the entire process:
If you are not using the tasks to convert the files, you can also copy the variable values to the file using Dispatch with the following setup:
Get the selected file datacard variable values
Look for a file with a similar name (replace *.sldasm / *.sldprt with *.pdf) > The caveat here is that the PDF name needs to have a predictable name format
'Paste' / copy the variable values to this file.
I have successfully done this in the past, so I know it is possible, however there are some assumptions I'm making here with regards to the Dispatch script:
1. You're not using descriptive AND different file names (e.g. mypart123.sldprt with a PDF called mypdf456.pdf) AND
2. The file names are the same (i.e. part123.sldprt and part123.pdf.)
3. They are not significantly different i.e. they have some text unique to them, with the only difference being the file extension)
4. The files are in predictable locations from each other (e.g. having the model in a predictable parent folder or in the same level folder)
Using this reasoning we can use the following to set variables:
you can extend this to even check the PDF in afterwards.
If you plan on using this on documents with names of different lengths/different extensions, use the find string function.
r_fullstopLocn = find(%nameofselectedfile%, . )
r_FilenameNoExt = left(%nameofselectedfile%, %r_fullstoplocn%)
The reason you are getting the message is that you've not included the path anywhere. Depending on how you've setup your vault, you will need to find a way of using the string functions and datacard variables to generate the target location.
Selected file -- c:\VaultName\Jobs\64xx\6410\CAD\xxxx.slddrw
Target File -- c:\VaultName\Jobs\64xx\6410\PDF\xxxx.pdf
For something like this you could create a variable
select file with path:
I have realized after I did this I had the names slightly different I think it was capslock
I have since tried again and the dispatch ran correctly but did not enter any information as it was pulling variables from the @ tab which we have cleared out to put focus on the configuration specific datacard tabs.
That is more complicated than I thought. Since the number of configurations and their names will differ from part to part, you will need to somehow get the same datacard (including tabs) and assign it to the associated pdf file. At the moment I cannot think of any way of doing this, it may be a case of an API program.