I'm looking to create a link between a drawing and a converted pdf with a task.
There is an option to create a reference from the pdf to the drawing but not the other way around. This option puts the pdf as a parent and the drawing as a child
Is there a solution to perform the conversion to pdf task by linking from the drawing to the pdf ? (parent drawing)
Indeed, I would like the generated pdf to be the child.
However, when I perform the conversion task via "Soldiworks Taskaddin", I can tick the option "Create a reference from the destination file to the source file". This option makes the pdf the parent of the drawing and I would like the other way around.
Maybe another conversion supplement exists to be able to make this link?
@Bart☺: He wants to create a virtual parent/child binding as proposed by EPDM.
By doing it manually, it is a "paste as reference" that allows you to associate a file of any type with a SW file and thus constitute a tree structure that can be exported and easily used (visualization of the attachments of the different files).
Like I said, it's not natively feasible. By macro it's feasible but you need to know about it to generate the snippet of code (see in the API help at Add Custom File Reference Example).
Now I have a little trouble seeing the usefulness since anyway the chest allows you to see the attachments in both directions (Content, Used in).
When the pdf is generated with the link in question, it cannot be viewed in an assembly.
If I look at the source drawing, I won't see anything in "content". I will only see my pdf in "used in".
My goal: From an assembly composed of sub-assemblies, and therefore several drawings, to be able to retrieve all the drawing pdfs contained in this assembly. If it works as I wanted, I will use the "copy tree" command to recover the files.
I've never done a Macro APi but I'll look into your suggestion to consult the help.
Make a macro to run from excel or SW to copy/paste as a reference (extraction/archiving...)
Make a macro in excel that analyzes the content of an assembly and finds the parents of each child (i.e.: each time we come across a drawing we find the pdf) and gives a hypertext link to the pdf (I already have the parent/child analysis part if needed)
Have an add-in made by your reseller who will make a link in the other direction (you will probably have to disable the creation of the original link of the task because I have a doubt about having a link in both directions)
I don't know the tasks in EPDM but if it's possible in creating one that launches an exe then it becomes easy to do what you want by a small program that creates the pdf and then pastes it under the SLDDRW plan.
In this program, however, it will be necessary to do a certain number of checks of the SLDDRW state type, SLDDRW extracted or not because pasting it as a reference requires extracting the parent file unless manipulated by the administrator.
I agree with Cyril.f who advises you to get in touch with your dealer who can make you the corresponding supplement.
@d.roger: You can actually use the tasks to launch a macro. On the other hand, afterwards you have to call this task via dispatch in order to launch the action.