[{"data":1,"prerenderedAt":106},["ShallowReactive",2],{"ZH1SNUcMjHLAKpgdmAAmTDNwD59aOcPWA1O66cNfwPo":3,"article_solidcraft-using-solidworks-api-fun-games_solidworks":10,"_apollo:default":104,"_apollo:identified":105},{"mailchimpAudience":4},{"actionUrl":5,"slug":6,"locale":7,"default":8,"__typename":9},"","solidcraft-using-solidworks-api-fun-games","en","https:\u002F\u002F3ds.us3.list-manage.com\u002Fsubscribe\u002Fpost?u=ed4601044e1936748c0d2aa6b&id=e5080ff9fe&f_id=002d4de2f0","MailchimpAudience",{"posts":11},{"nodes":12,"__typename":103},[13],{"id":14,"slug":6,"title":15,"uri":16,"excerpt":17,"locale":18,"featuredImage":21,"tableOfContents":29,"content":34,"date":35,"authorJobTitle":5,"author":36,"masterings":49,"globalTags":63,"products":77,"disciplines":88,"seo":92,"__typename":102},"cG9zdDoxMjMxMA==","SOLIDCRAFT – Using SOLIDWORKS API for Fun and Games","\u002Fproducts\u002Fsolidworks\u002Fsolidcraft-using-solidworks-api-fun-games","\u003Cp>What is SOLIDWORKS API? SOLIDWORKS API is a gateway to automating your…\u003C\u002Fp>\n",{"locale":19,"__typename":20},"en_US","Locale",{"node":22,"__typename":28},{"large":23,"__typename":24,"medium_large":23,"thumbnail":25,"srcSet":26,"sizes":27},"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidworks-solidcraft-api.jpg.webp","MediaItem","https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidworks-solidcraft-api-150x150.jpg.webp","https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidworks-solidcraft-api.jpg.webp 500w, https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidworks-solidcraft-api-300x196.jpg.webp 300w","(max-width: 500px) 100vw, 500px","NodeWithFeaturedImageToMediaItemConnectionEdge",[30,31,32,33],"What is SOLIDWORKS API?|what-is-solidworks-api-0","Creating a Macro|creating-a-macro-1","But all of these cubes are grey, where are the Minecraft textures?!|but-all-of-these-cubes-are-grey-where-are-the-minecraft-textures-2","In Conclusion|in-conclusion-3","\u003Cfigure class=\"wp-block-image size-large\">\u003Cimg loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"326\" src=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Flogo-with-trees.jpg.webp\" alt=\"\" class=\"wp-image-12312\" srcset=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Flogo-with-trees.jpg.webp 500w, https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Flogo-with-trees-300x196.jpg.webp 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \u002F>\u003C\u002Ffigure>\u003Ch2 class=\"wp-block-heading\" id=\"what-is-solidworks-api-0\">What is SOLIDWORKS API?\u003C\u002Fh2>\u003Cp>SOLIDWORKS API is a gateway to automating your design process and data management. Using .NET compatible languages (VB, C#, C++) one can write small macros or build full-blown add-ins for modelling, routine edits and feeding data from one software package to another.\u003C\u002Fp>\u003Cp>We at \u003Ca href=\"https:\u002F\u002Fwww.solidsolutions.co.uk\u002Fsolidworks\u002FData-Management\u002FPackages\u002FPDM-Professional.aspx\" data-id=\"12318\">Solid Solutions\u003C\u002Fa> offer \u003Ca href=\"https:\u002F\u002Fwww.solidsolutions.co.uk\u002Fsolidworks-Services\u002FConsultancy\u002Fdefault.aspx\" data-id=\"12318\">bespoke coding on a consultancy basis\u003C\u002Fa>. Be it a one-page input form, a \u003Ca href=\"https:\u002F\u002Fwww.solidsolutions.co.uk\u002Fsolidworks\u002FData-Management\u002FPackages\u002FPDM-Professional.aspx\" data-id=\"12318\">PDM Pro\u003C\u002Fa> custom task or a multiplatform app that talks to SOLIDWORKS – we have a team of automation specialists able to tackle a wide range of challenges.\u003C\u002Fp>\u003Cp>But what can be done with API outside of office hours, just for fun? Well, it’s not very hard to implement some basic MINECRAFT functionality with a couple of macros. Let’s have a look at the process and some results!\u003C\u002Fp>\u003Ch2 class=\"wp-block-heading\" id=\"creating-a-macro-1\">Creating a Macro\u003C\u002Fh2>\u003Col class=\"wp-block-list\">\n\u003Cli>We start with a small 10x10x10mm cube model (could be any other size).\u003C\u002Fli>\n\u003Cli>Start recording a macro (Tools->Macro->Record).\u003C\u002Fli>\n\u003Cli>Perform the following steps by hand:\n\u003Cul class=\"wp-block-list\">\n\u003Cli>Select any face on the cube surface and start a new Sketch.\u003C\u002Fli>\n\u003Cli>Use the Sketch -> Convert Entities command.\u003C\u002Fli>\n\u003Cli>Boss extrude 10mm Blind without merging the result. Actual extrusion depth depends on the size of your initial cube.\u003C\u002Fli>\n\u003Cli>Stop recording the macro, save it into a separate folder.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003C\u002Fol>\u003Cfigure class=\"wp-block-image size-large\">\u003Cimg loading=\"lazy\" decoding=\"async\" width=\"763\" height=\"776\" src=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog-1.png.webp\" alt=\"\" class=\"wp-image-12313\" srcset=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog-1.png.webp 763w, https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog-1-295x300.png.webp 295w\" sizes=\"auto, (max-width: 763px) 100vw, 763px\" \u002F>\u003C\u002Ffigure>\u003Cp>You will need to edit the code behind your macro to remove the selection part. This is done through Tools -> Macro -> Edit. Your macro code will look similar to one below:\u003C\u002Fp>\u003Cfigure class=\"wp-block-image size-large\">\u003Cimg loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"491\" src=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog-2.png.webp\" alt=\"\" class=\"wp-image-12314\" srcset=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog-2.png.webp 750w, https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog-2-300x196.png.webp 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \u002F>\u003C\u002Ffigure>\u003Cp>This macro allows you to ‘draw’ cubes on top\u002Fbelow\u002Fnext to other cubes. If bound to a keyboard shortcut or a spare mouse button this can be done very quickly.\u003C\u002Fp>\u003Ch2 class=\"wp-block-heading\" id=\"but-all-of-these-cubes-are-grey-where-are-the-minecraft-textures-2\">But all of these cubes are grey, where are the Minecraft textures?!\u003C\u002Fh2>\u003Cp>Okay, this is where things get tricky. You will need some \u003Ca href=\"https:\u002F\u002Fwww.solidsolutions.co.uk\u002Fsolidworks\u002FTutorial-Videos\u002FAutomate-SOLIDWORKS-with-the-API.aspx\" data-id=\"12318\">SOLIDWORKS API\u003C\u002Fa> and VBA programming knowledge from here onward. I created some textured appearances and saved them as .p2m files in a sub folder next to my macro file. Then we add some bits of intelligence to the already existing macro:\u003C\u002Fp>\u003Cfigure class=\"wp-block-image size-large\">\u003Cimg loading=\"lazy\" decoding=\"async\" width=\"690\" height=\"508\" src=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog-3.png.webp\" alt=\"\" class=\"wp-image-12315\" srcset=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog-3.png.webp 690w, https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog-3-300x221.png.webp 300w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \u002F>\u003C\u002Ffigure>\u003Cp>I created two macros for ‘bark’ and ‘leaves. Now we can ‘draw’ some vegetation:\u003C\u002Fp>\u003Cdiv class=\"ds-video\">\u003Ca data-3ds-videoplayer=\"modal\" href=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Fsolidcraft-macro-blog.mp4\" target=\"_blank\">\u003Cspan class=\"ImageCover Border Block\" style=\"background-image: url(\u002Fassets\u002Fimg\u002F3ds-default.webp); width:100%; height: 100%;\">\u003Cspan class=\"Btn--circle isCenter\">\u003Ci class=\"Icon Icon--playBig\">\u003C\u002Fi>\u003C\u002Fspan>\u003Cimg decoding=\"async\" src=\"\u002Fassets\u002Fimg\u002F3ds-default.webp\" alt=\"\" style=\"width:100%;\">\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fdiv>\u003Cp>With some time and effort we can grow trees even:\u003C\u002Fp>\u003Cfigure class=\"wp-block-image size-large\">\u003Cimg loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"481\" src=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Ftree20growing.gif.webp\" alt=\"\" class=\"wp-image-12316\">\u003C\u002Ffigure>\u003Cfigure class=\"wp-block-image size-large\">\u003Cimg loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"373\" src=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F02\u002Ftree20spinning.gif.webp\" alt=\"\" class=\"wp-image-12317\">\u003C\u002Ffigure>\u003Ch2 class=\"wp-block-heading\" id=\"in-conclusion-3\">In Conclusion\u003C\u002Fh2>\u003Cp>Here we have barely scratched the surface of what SOLIDWORKS API is capable of… Minecraft within \u003Ca href=\"https:\u002F\u002Fwww.solidsolutions.co.uk\u002Fsolidworks\u002F3D-CAD\u002FPackages\u002Fdefault.aspx\" data-id=\"12318\">SOLIDWORKS\u003C\u002Fa>!\u003C\u002Fp>\u003Cp>Now show this to the young people you know, maybe they will become SOLIDCRAFT Engineers one day.\u003C\u002Fp>\u003Cp>Rodion Radchenko\n\u003Ca href=\"https:\u002F\u002Fwww.solidsolutions.co.uk\u002FAbout-Us\u002FWhy-SolidSolutions\u002FWorlds-Best-SOLIDWORKS-Support.aspx\" data-id=\"12318\">Elite\u003C\u002Fa> Applications Engineer\u003C\u002Fp>","2017-06-05T11:00:33",{"node":37,"__typename":48},{"nicename":38,"description":39,"slug":40,"name":41,"firstName":42,"lastName":43,"avatar":44,"__typename":47},"solid-solutions-technical-team","Solid Solutions Management Ltd was founded in 1998, originally as a SOLIDWORKS training and support provider. Now a Group with over 20 offices across the UK and Ireland, Solid Solutions is not only the leading SOLIDWORKS 3D CAD reseller in both regions, it also offers expert professional design solutions and consultancy services to more than 15,000+ customers. With over 200 employees and the largest SOLIDWORKS technical team in the world, Solid Solutions is focused on growth and on its customers’ development and success.","nicksibly","Solid Solutions Technical Team","SolidSolutions","Technical Team",{"url":45,"__typename":46},"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Fsolid_solutions_solidworks_logo.jpg-96x96.webp","Avatar","User","NodeWithAuthorToUserConnectionEdge",{"nodes":50,"edges":57,"__typename":62},[51],{"id":52,"name":53,"slug":54,"uri":55,"__typename":56},"dGVybToxOTk2","Tutorials","tutorials","\u002Fmastering\u002Ftutorials\u002F","Taxonomy_mastering",[58],{"isPrimary":59,"node":60,"__typename":61},false,{"id":52,"name":53,"slug":54,"uri":55,"__typename":56},"PostToTaxonomy_masteringConnectionEdge","PostToTaxonomy_masteringConnection",{"nodes":64,"__typename":76},[65,71],{"id":66,"name":67,"slug":68,"uri":69,"__typename":70},"dGVybTo5NjAz","SOLIDWORKS","solidworks","\u002Ftags\u002Fsolidworks\u002F","Taxonomy_tag",{"id":72,"name":73,"slug":74,"uri":75,"__typename":70},"dGVybTo5NTk2","Tips and Tricks","tips-tricks","\u002Ftags\u002Ftips-tricks\u002F","PostToTaxonomy_tagConnection",{"edges":78,"nodes":85,"__typename":87},[79],{"isPrimary":59,"node":80,"__typename":84},{"id":81,"name":67,"slug":68,"uri":82,"__typename":83},"dGVybTo1Ng==","\u002Fproducts\u002Fsolidworks\u002F","Taxonomy_product","PostToTaxonomy_productConnectionEdge",[86],{"id":81,"name":67,"slug":68,"uri":82,"__typename":83},"PostToTaxonomy_productConnection",{"nodes":89,"edges":90,"__typename":91},[],[],"PostToTaxonomy_disciplineConnection",{"canonical":5,"title":93,"metaDesc":5,"opengraphAuthor":5,"opengraphDescription":94,"opengraphTitle":15,"opengraphUrl":95,"opengraphSiteName":96,"opengraphPublishedTime":97,"opengraphModifiedTime":98,"twitterTitle":5,"twitterDescription":5,"readingTime":99,"metaRobotsNoindex":100,"__typename":101},"SOLIDCRAFT – Using SOLIDWORKS API for Fun and Games - Blog Solidworks","What is SOLIDWORKS API? SOLIDWORKS API is a gateway to automating your…","\u002Fproducts\u002Fsolidworks\u002Fsolidcraft-using-solidworks-api-fun-games\u002F","Blog Solidworks","2017-06-05T15:00:33+00:00","2025-02-11T06:45:02+00:00",2,"noindex","PostTypeSEO","Post","RootQueryToPostConnection",{},{},1777488368446]