{"id":199,"date":"2009-06-04T22:28:15","date_gmt":"2009-06-05T06:28:15","guid":{"rendered":"http:\/\/www.fcsuper.com\/swblog\/?p=199"},"modified":"2009-06-03T19:42:22","modified_gmt":"2009-06-04T03:42:22","slug":"new-type-of-saveaspdf-macro","status":"publish","type":"post","link":"http:\/\/www.fcsuper.com\/swblog\/?p=199","title":{"rendered":"New type of SaveAsPDF macro"},"content":{"rendered":"<p>SolidWorks is able to save drawings and current model views as a PDF format file.\u00c2\u00a0 <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/fcsuper.com\/images\/folder1.jpg?resize=225%2C320\" alt=\"SaveAsPDF with Folder Selection\" style=\"width: 311px; height: 364px\" vspace=\"2\" width=\"225\" align=\"left\" border=\"2\" height=\"320\" hspace=\"2\" \/>There&#8217;s been a lot of macros written over the years that cut the process of saving as PDF down to as few steps as possible. One of the long standing requests for this type of macro (and many similar types of macros) is to allow the user to pick the save location. Just <a href=\"http:\/\/sw.fcsuper.com\/index.php?name=UpDownload&amp;req=viewdownloaddetails&amp;lid=130\" target=\"_blank\" title=\"SaveAsPDF with Folder Selection\"><strong>uploaded is a macro<\/strong><\/a>\u00c2\u00a0(<a href=\"http:\/\/sw.fcsuper.com\/index.php?name=UpDownload&amp;req=viewdownloaddetails&amp;lid=130\" target=\"_blank\" title=\"SaveAsPDF with Folder Selection\">SaveAsPDF with Folder Selection<\/a>) that does just this, and simplifies the location selection process for default folders. This new macro also uses more modern API techniques to save the file (using modelext::saveas instead of model::saveas4).<\/p>\n<p>This macro does many things that previous macros haven&#8217;t.\u00c2\u00a0 While allowing the user to establish a default save location folder, it also provides automatic alternative choices when the default is not available.\u00c2\u00a0\u00c2\u00a0Yet, even with all of these, the user can still override automated selection and pick a new location.\u00c2\u00a0 It does all of this without the use of VB6 forms.<\/p>\n<p>As with other macros that do similar tasks, this will work best when assigned to a keyboard shortcut or a toolbar icon.\u00c2\u00a0\u00c2\u00a0 Also, as with all SolidWorks macros, there is a chance it will not work &#8220;out-of-the-box&#8221;.\u00c2\u00a0 This is normally due to the fact that SolidWorks updates core\u00c2\u00a0reference libraries with each release.\u00c2\u00a0 If errors are encountered,\u00c2\u00a0simply\u00c2\u00a0re-reference to\u00c2\u00a0the\u00c2\u00a0libraries that are available\u00c2\u00a0to allow the macro to function.\u00c2\u00a0 More information about that is available in this <a href=\"http:\/\/www.fcsuper.com\/swblog\/?p=173\" target=\"_blank\" title=\"Fixing macros\">previous article<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SolidWorks is able to save drawings and current model views as a PDF format file.\u00c2\u00a0 There&#8217;s been a lot of macros written over the years that cut the process of saving as PDF down to as few steps as possible. One of the long standing requests for this type of macro (and many similar types &hellip; <a href=\"http:\/\/www.fcsuper.com\/swblog\/?p=199\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;New type of SaveAsPDF macro&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[16,95,17,11,18],"tags":[584,585,583],"series":[],"class_list":["post-199","post","type-post","status-publish","format-standard","hentry","category-drawing","category-macros","category-model-assembly","category-news","category-part","tag-pdf","tag-save","tag-saveaspdf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>New type of SaveAsPDF macro - SolidWorks Legion<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fcsuper.com\/swblog\/?p=199\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New type of SaveAsPDF macro - SolidWorks Legion\" \/>\n<meta property=\"og:description\" content=\"SolidWorks is able to save drawings and current model views as a PDF format file.\u00c2\u00a0 There&#8217;s been a lot of macros written over the years that cut the process of saving as PDF down to as few steps as possible. One of the long standing requests for this type of macro (and many similar types &hellip; Continue reading &quot;New type of SaveAsPDF macro&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fcsuper.com\/swblog\/?p=199\" \/>\n<meta property=\"og:site_name\" content=\"SolidWorks Legion\" \/>\n<meta property=\"article:published_time\" content=\"2009-06-05T06:28:15+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/fcsuper.com\/images\/folder1.jpg\" \/>\n<meta name=\"author\" content=\"fcsuper\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@swsuper\" \/>\n<meta name=\"twitter:site\" content=\"@swsuper\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"fcsuper\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199\"},\"author\":{\"name\":\"fcsuper\",\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/859d9f25668554f7193852892dbad92b\"},\"headline\":\"New type of SaveAsPDF macro\",\"datePublished\":\"2009-06-05T06:28:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199\"},\"wordCount\":258,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/859d9f25668554f7193852892dbad92b\"},\"image\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199#primaryimage\"},\"thumbnailUrl\":\"http:\/\/fcsuper.com\/images\/folder1.jpg\",\"keywords\":[\"pdf\",\"save\",\"SaveAsPDF\"],\"articleSection\":[\"Drawing\",\"macros\",\"Model Assembly\",\"News\",\"Part\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.fcsuper.com\/swblog\/?p=199#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199\",\"url\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199\",\"name\":\"New type of SaveAsPDF macro - SolidWorks Legion\",\"isPartOf\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199#primaryimage\"},\"thumbnailUrl\":\"http:\/\/fcsuper.com\/images\/folder1.jpg\",\"datePublished\":\"2009-06-05T06:28:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.fcsuper.com\/swblog\/?p=199\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199#primaryimage\",\"url\":\"http:\/\/fcsuper.com\/images\/folder1.jpg\",\"contentUrl\":\"http:\/\/fcsuper.com\/images\/folder1.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/?p=199#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.fcsuper.com\/swblog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New type of SaveAsPDF macro\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/#website\",\"url\":\"https:\/\/www.fcsuper.com\/swblog\/\",\"name\":\"SolidWorks Legion\",\"description\":\"SolidWorks related topics!\",\"publisher\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/859d9f25668554f7193852892dbad92b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.fcsuper.com\/swblog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/859d9f25668554f7193852892dbad92b\",\"name\":\"fcsuper\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.fcsuper.com\/swblog\/wp-content\/uploads\/2014\/12\/310185_10150356792820560_1654177_n.jpg?fit=153%2C153\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.fcsuper.com\/swblog\/wp-content\/uploads\/2014\/12\/310185_10150356792820560_1654177_n.jpg?fit=153%2C153\",\"width\":153,\"height\":153,\"caption\":\"fcsuper\"},\"logo\":{\"@id\":\"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/image\/\"},\"description\":\"As a drafter, mechanical designer and CAD engineer, I've been in the mechanical design field since 1991. For the first 8 years of my career, I was an AutoCAD professional. I utilized AutoLISP and many other AutoCAD customization features to streamline drafting activities for 6+ drafters and designers. I authored several custom functions, one of which was published in the March 1997 issue of Cadalyst Magazine. Since 1998, I've been used SolidWorks non-stop. I've worked to utilize the SolidWorks' user environment to simplify drafting and design activities for 20+ engineers. I've created this website to provide current information about SolidWorks from a variety of contributors. More recently, I am now employed by Dassault Systemes as SOLIDWORKS Sr. Product Definition Manager to improve drawing, annotation and MBD related areas.\",\"sameAs\":[\"http:\/\/www.fcsuper.com\/swblog\",\"https:\/\/x.com\/swsuper\"],\"url\":\"http:\/\/www.fcsuper.com\/swblog\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New type of SaveAsPDF macro - SolidWorks Legion","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fcsuper.com\/swblog\/?p=199","og_locale":"en_US","og_type":"article","og_title":"New type of SaveAsPDF macro - SolidWorks Legion","og_description":"SolidWorks is able to save drawings and current model views as a PDF format file.\u00c2\u00a0 There&#8217;s been a lot of macros written over the years that cut the process of saving as PDF down to as few steps as possible. One of the long standing requests for this type of macro (and many similar types &hellip; Continue reading \"New type of SaveAsPDF macro\"","og_url":"https:\/\/www.fcsuper.com\/swblog\/?p=199","og_site_name":"SolidWorks Legion","article_published_time":"2009-06-05T06:28:15+00:00","og_image":[{"url":"http:\/\/fcsuper.com\/images\/folder1.jpg","type":"","width":"","height":""}],"author":"fcsuper","twitter_card":"summary_large_image","twitter_creator":"@swsuper","twitter_site":"@swsuper","twitter_misc":{"Written by":"fcsuper","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199#article","isPartOf":{"@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199"},"author":{"name":"fcsuper","@id":"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/859d9f25668554f7193852892dbad92b"},"headline":"New type of SaveAsPDF macro","datePublished":"2009-06-05T06:28:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199"},"wordCount":258,"commentCount":3,"publisher":{"@id":"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/859d9f25668554f7193852892dbad92b"},"image":{"@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199#primaryimage"},"thumbnailUrl":"http:\/\/fcsuper.com\/images\/folder1.jpg","keywords":["pdf","save","SaveAsPDF"],"articleSection":["Drawing","macros","Model Assembly","News","Part"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.fcsuper.com\/swblog\/?p=199#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199","url":"https:\/\/www.fcsuper.com\/swblog\/?p=199","name":"New type of SaveAsPDF macro - SolidWorks Legion","isPartOf":{"@id":"https:\/\/www.fcsuper.com\/swblog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199#primaryimage"},"image":{"@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199#primaryimage"},"thumbnailUrl":"http:\/\/fcsuper.com\/images\/folder1.jpg","datePublished":"2009-06-05T06:28:15+00:00","breadcrumb":{"@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fcsuper.com\/swblog\/?p=199"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199#primaryimage","url":"http:\/\/fcsuper.com\/images\/folder1.jpg","contentUrl":"http:\/\/fcsuper.com\/images\/folder1.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fcsuper.com\/swblog\/?p=199#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fcsuper.com\/swblog"},{"@type":"ListItem","position":2,"name":"New type of SaveAsPDF macro"}]},{"@type":"WebSite","@id":"https:\/\/www.fcsuper.com\/swblog\/#website","url":"https:\/\/www.fcsuper.com\/swblog\/","name":"SolidWorks Legion","description":"SolidWorks related topics!","publisher":{"@id":"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/859d9f25668554f7193852892dbad92b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.fcsuper.com\/swblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/859d9f25668554f7193852892dbad92b","name":"fcsuper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.fcsuper.com\/swblog\/wp-content\/uploads\/2014\/12\/310185_10150356792820560_1654177_n.jpg?fit=153%2C153","contentUrl":"https:\/\/i0.wp.com\/www.fcsuper.com\/swblog\/wp-content\/uploads\/2014\/12\/310185_10150356792820560_1654177_n.jpg?fit=153%2C153","width":153,"height":153,"caption":"fcsuper"},"logo":{"@id":"https:\/\/www.fcsuper.com\/swblog\/#\/schema\/person\/image\/"},"description":"As a drafter, mechanical designer and CAD engineer, I've been in the mechanical design field since 1991. For the first 8 years of my career, I was an AutoCAD professional. I utilized AutoLISP and many other AutoCAD customization features to streamline drafting activities for 6+ drafters and designers. I authored several custom functions, one of which was published in the March 1997 issue of Cadalyst Magazine. Since 1998, I've been used SolidWorks non-stop. I've worked to utilize the SolidWorks' user environment to simplify drafting and design activities for 20+ engineers. I've created this website to provide current information about SolidWorks from a variety of contributors. More recently, I am now employed by Dassault Systemes as SOLIDWORKS Sr. Product Definition Manager to improve drawing, annotation and MBD related areas.","sameAs":["http:\/\/www.fcsuper.com\/swblog","https:\/\/x.com\/swsuper"],"url":"http:\/\/www.fcsuper.com\/swblog\/?author=2"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=\/wp\/v2\/posts\/199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=199"}],"version-history":[{"count":0,"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=\/wp\/v2\/posts\/199\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=199"},{"taxonomy":"series","embeddable":true,"href":"http:\/\/www.fcsuper.com\/swblog\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}