[{"data":1,"prerenderedAt":89,"prefetchLinks":90},["ShallowReactive",2],{"article_scripts-in-draftsight_draftsight":3,"_apollo:default":87,"_apollo:identified":88},{"posts":4},{"nodes":5,"__typename":86},[6],{"id":7,"slug":8,"title":9,"uri":10,"excerpt":11,"locale":12,"featuredImage":15,"tableOfContents":23,"content":24,"date":25,"authorJobTitle":26,"author":27,"masterings":37,"globalTags":51,"products":60,"disciplines":71,"seo":75,"__typename":85},"cG9zdDo1OTIyNQ==","scripts-in-draftsight","Scripts in DraftSight","\u002Fproducts\u002Fdraftsight\u002Fscripts-in-draftsight","\u003Cp>Scripts can be used to automate certain tasks within DraftSight.  It today’s…\u003C\u002Fp>\n",{"locale":13,"__typename":14},"en_US","Locale",{"node":16,"__typename":22},{"large":17,"__typename":18,"medium_large":17,"thumbnail":19,"srcSet":20,"sizes":21},"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Fscriptcover.jpg.webp","MediaItem","https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Fscriptcover-150x150.jpg.webp","https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Fscriptcover.jpg.webp 600w, https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Fscriptcover-300x172.jpg.webp 300w","(max-width: 600px) 100vw, 600px","NodeWithFeaturedImageToMediaItemConnectionEdge",[],"\u003Cp class=\"wp-block-paragraph\">Scripts can be used to automate certain tasks within DraftSight.  It today’s blog, I’ll show you an example of a simple script that creates Layers and assigns Colours to those layers.  So, what do you need to get started? Well actually, apart from a copy of DraftSight, all you need is a text editor.  I’ll be using Notepad ++, but you can use Notepad that comes with Windows.\u003C\u002Fp>\u003Cfigure class=\"wp-block-image size-large\">\u003Cimg loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"560\" src=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Fscript1-650x560-1.png.webp\" alt=\"\" class=\"wp-image-59227\" srcset=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Fscript1-650x560-1.png.webp 650w, https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Fscript1-650x560-1-300x258.png.webp 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \u002F>\u003C\u002Ffigure>\u003Cp class=\"wp-block-paragraph\">So that’s out script.  I’ll go though it and explain just what each line does and the formation of each line.\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">Line 1 is the command, in this case it is the Layer command.\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">Line 2 starts with n ( for new layer) and then creates these layers building, int-walls, windows, doors, int-dims, ext-dims, floor, and finally, room-names.  The structure of this line is very important.  There is no space between the layer names, it goes LayerName,LayerName,LayerName and so on.\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">Lines 3 to 10 assign a colour to the different Layers. So, the Line 3 starts with c (c for colour) 8 (for the colour number) and building (the layer name). There is a space between each entry on these lines, it goes c 8 building\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">Line 11 closes out the script using the (command).\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">You can, if you wish, edit the script to assign LineStyles (LS), LineWeight (LW) and other settings to your layers.\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">You can Copy and Paste the text below into Notepad and edit to suit your needs.  Once happy with your script, save it with the file extension *.scr\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">\u003Cem>layer\u003C\u002Fem>\n\u003Cem>n building,int-walls,windows,doors,int-dims,ext-dims,floor,room-names\u003C\u002Fem>\n\u003Cem>c 8 building\u003C\u002Fem>\n\u003Cem>c 6 int-walls\u003C\u002Fem>\n\u003Cem>c 3 windows\u003C\u002Fem>\n\u003Cem>c 4 doors\u003C\u002Fem>\n\u003Cem>c 5 room-names\u003C\u002Fem>\n\u003Cem>c 2 int-dims\u003C\u002Fem>\n\u003Cem>c 7 floor\u003C\u002Fem>\n\u003Cem>c 1 ext-dims\u003C\u002Fem>\n\u003Cem>(command)\u003C\u002Fem>\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">To run the Script, just type LoadScript at the Command Window and select your Script file.  It’s as easy as that.\u003C\u002Fp>\u003Cfigure class=\"wp-block-image size-large\">\u003Cimg loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"452\" src=\"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Frecording-35-650x452-1.gif.webp\" alt=\"\" class=\"wp-image-59228\">\u003C\u002Ffigure>\u003Cp class=\"wp-block-paragraph\">And that’s how to create a simple Script to automate Layer Creation in DraftSight.\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">IMPORTANT:\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">DraftSight 2019 for Windows® is offered in paid versions only.\nOnce you download and install DraftSight 2019 (free 30-day trial or purchased version), you will no longer be able to re-download or access any previous free version of DraftSight (2018 or earlier). All free versions of DraftSight (2018 or earlier) will cease to run after 12\u002F31\u002F2019.\u003C\u002Fp>\u003Cp class=\"wp-block-paragraph\">Learn more about DraftSight 2019 \u003Ca href=\"https:\u002F\u002Fwww.draftsight.com\u002F?utm_medium=Display&#038;utm_source=Blog&#038;utm_campaign=DraftSight_Blog&#038;utm_content=Learn_More_DS2019_&#038;utm_term=link-text\" target=\"_blank\" rel=\"noopener\">here\u003C\u002Fa>.\u003C\u002Fp>","2019-11-19T11:11:55","",{"node":28,"__typename":36},{"nicename":29,"description":30,"slug":29,"name":31,"firstName":31,"lastName":26,"avatar":32,"__typename":35},"draftsight","DraftSight is a professional-grade 2D CAD product that allows you to access existing DWG files and create new ones at fraction of the cost of alternative CAD products.","DraftSight",{"url":33,"__typename":34},"https:\u002F\u002Fblog-assets.solidworks.com\u002Fuploads\u002F2025\u002F12\u002Fdraftsight-avatar.jpg-96x96.webp","Avatar","User","NodeWithAuthorToUserConnectionEdge",{"nodes":38,"edges":45,"__typename":50},[39],{"id":40,"name":41,"slug":42,"uri":43,"__typename":44},"dGVybToxOTk2","Tutorials","tutorials","\u002Fmastering\u002Ftutorials\u002F","Taxonomy_mastering",[46],{"isPrimary":47,"node":48,"__typename":49},false,{"id":40,"name":41,"slug":42,"uri":43,"__typename":44},"PostToTaxonomy_masteringConnectionEdge","PostToTaxonomy_masteringConnection",{"nodes":52,"__typename":59},[53],{"id":54,"name":55,"slug":56,"uri":57,"__typename":58},"dGVybTo5NTk2","Tips and Tricks","tips-tricks","\u002Ftags\u002Ftips-tricks\u002F","Taxonomy_tag","PostToTaxonomy_tagConnection",{"edges":61,"nodes":68,"__typename":70},[62],{"isPrimary":47,"node":63,"__typename":67},{"id":64,"name":31,"slug":29,"uri":65,"__typename":66},"dGVybTo1NQ==","\u002Fproducts\u002Fdraftsight\u002F","Taxonomy_product","PostToTaxonomy_productConnectionEdge",[69],{"id":64,"name":31,"slug":29,"uri":65,"__typename":66},"PostToTaxonomy_productConnection",{"nodes":72,"edges":73,"__typename":74},[],[],"PostToTaxonomy_disciplineConnection",{"canonical":76,"title":77,"metaDesc":26,"opengraphAuthor":26,"opengraphDescription":78,"opengraphTitle":9,"opengraphUrl":76,"opengraphSiteName":79,"opengraphPublishedTime":80,"opengraphModifiedTime":81,"twitterTitle":26,"twitterDescription":26,"readingTime":82,"metaRobotsNoindex":83,"__typename":84},"https:\u002F\u002Fblog-contrib-prd.itvpc.solidworks.com\u002Fproducts\u002Fdraftsight\u002Fscripts-in-draftsight\u002F","Scripts in DraftSight - Blog Solidworks","Scripts can be used to automate certain tasks within DraftSight.  It today’s…","Blog Solidworks","2019-11-19T16:11:55+00:00","2026-02-12T20:38:02+00:00",2,"index","PostTypeSEO","Post","RootQueryToPostConnection",{},{},1790274808485,[91,97,99,101,103,106],{"rel":92,"href":93,"as":94,"type":95,"crossorigin":96},"preload","https:\u002F\u002Fwww.3ds.com\u002Fstatics\u002Ffonts\u002F3ds\u002F3ds-Light-v2.woff2","font","font\u002Fwoff2","anonymous",{"rel":92,"href":98,"as":94,"type":95,"crossorigin":96},"https:\u002F\u002Fwww.3ds.com\u002Fstatics\u002Ffonts\u002F3ds\u002F3ds-Regular-v2.woff2",{"rel":92,"href":100,"as":94,"type":95,"crossorigin":96},"https:\u002F\u002Fwww.3ds.com\u002Fstatics\u002Ffonts\u002F3ds\u002F3ds-SemiBold-v2.woff2",{"rel":92,"href":102,"as":94,"type":95,"crossorigin":96},"https:\u002F\u002Fwww.3ds.com\u002Fstatics\u002Ffonts\u002F3ds\u002F3ds-Bold-v2.woff2",{"rel":92,"href":104,"as":105},"https:\u002F\u002Fwww.3ds.com\u002Fstatics\u002F3ds-navigation\u002Fds-header.min.js","script",{"rel":92,"href":107,"as":105},"https:\u002F\u002Fwww.3ds.com\u002Fstatics\u002F3ds-navigation\u002Fds-footer.min.js"]