• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

CadOasis

Ease Your CAD Software Experience !

  • Home
  • Courses
  • Tutorials
  • Community
  • Blog
Home » Write and Run Script files in DraftSight

February 5, 2015 By cadoasis

Write and Run Script files in DraftSight

Yes, you can load Script files in DraftSight to automate your commands and even if you are Free user of DraftSight.

You need to write script file in Notepad which can store text in ASCII format.

A script file executes a sequence of commands .

File fomat: .scr

How to write a Script file?

To write as Script file from Scratch Open ‘notepad’ in windows OS.

You need to write commands , values or options in notepad that you generally type in Command line of DraftSight.

You may copy command history into Notepad but you need to remove instructions and Options part from it.

Lets say for example we want to write a script file which can draw Rectangle of  in GA>

My Command line history will be:

RECTANGLE
Options: Chamfer, Elevation, Fillet, Thickness, line Width or
Specify start corner» 0,0
Options: Area, Dimensions, Rotation or
Specify opposite corner» 297,210

Now

Copy command history and edit it as below, check what things we removed.

RECTANGLE
0,0 
297,210

Now while saving text file do ‘Save As…’add extension to file name as ‘Rectangle.scr’. Save as type is ‘All Files’.

 

and save file on say desktop or any location you want.

How to Load Script file ?

To load script file created above .

Start DraftSight application , if you have already opened application then make sure no entity present in model so you can see rectangle created after load script.

Go to Tools > Run Script.

or

you can run command LOADSCRIPT.

And select file saved in .scr format.

When you click on open , A Rectangle will create with start point 0,0 and corner point 297,210.

You can play with it and create bunch of sample script files and use it as per your work to automate repetitive commands .


Tip: Script files won’t run on Dialog boxes so keep dialog boxes off by using command: DISPLAYDIALOGS and select ‘No’


 

Filed Under: Blog, DraftSight Tagged With: script



Reader Interactions

Comments

  1. Aaro Latvala says

    January 9, 2016 at 1:49 am

    How do I get a command to a specific file.
    Will all levels hydrated to run a command?
    How do I get a certain line type to a certain level?
    Is scipts literature?

Primary Sidebar

From CadOasis Academy

Search on CadOasis !

Categories

Advertisement:




Footer

  • About Us
  • Showcase
  • CAD Software
  • Contact Us
  • Links
  • Disclaimer
  • Privacy Policy
  • Terms and Services
Creative Commons License
CadOasis.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

© Copyright 2014-2019 CadOasis Training & Solutions · All Rights Reserved ·