There have been a lot of discussion of this topic in many forums but I feel that the question has not been answered completely. The basic task that I am trying to complete is to have a Macro button that I can click to save current drawing to PDF in a certain folder. My company is switching to a new MRP system that can link parts to PDF files. This means that the latest files have to be placed in a special folder on the network that system can access. No additional changes in the file name necessary (rev level, date, etc.)
At this point in reading my post most of the people started thinking: "why don't you use Save As PDF 1.22"? well it does not work for me. (WinXPx64, SW Professional 2010 SP 2.1) For some reason I am getting "Run-time error '91' - Object variable or With block variable not set." When I proceed to Debug it takes me to visual basic, which in its turn highlights swFrame.SetStatusBarText "Done" in the Sub last(). If I disable the notification box that would display DONE in the end that it takes me to any other swFrame function that can be found in the middle of the macro.
At this point all I am trying to do is save file as PDF to a location on the network after it has been checked in to PDM. In the future we might include .dxf or even a .stp files for solid parts, but all I need at this point is to get Save As PDF to work. or any other method for that matter.
Thank you in advance for help. I will post a complete macro in the end of this thread for future reference for those who are experiencing similar problems.
SolidworksApi macros