 
 
 
 
 
 
                BASIS Drafting Enhancements - Documentation Addendum 
 
                 BASIS ADS Link Version 1.01  -   February 25, 1995 
                 AutoCAD Drafting Enhancements for BASIS Cogo users 
              BASIS Enhanced Copyright (C) 1995 by William Giel, L.S. 
 
                                General Information 
 
 
       The basic  set of BASIS/AutoCAD enhancements is comprised of the files 
       BASIS.EXE, BASISPRJ.EXE,  BASISSEQ.EXE.  These  three programs provide 
       the necessary  functions to  transfer cogo points to and from  AutoCAD 
       drawings, create new BASIS project files as needed,  and draw lines or 
       polylines through BASIS coordinates by entering chains of point numbers. 
 
       What's different about these programs from the previous BASIS drafting 
       enhancements, is that these functions are now accomplished without the 
       need to shell out of AutoCAD to external programs. 
 
       Thanks to  the AutoCAD Application Development System (ADS), these 
       programs  were developed in the same C++ environment as the rest of 
       BASIS.  Coupled with  AutoCAD's Dialog  Control Language (DCL), the 
       programs have  the look  and feel of built-in AutoCAD  commands and 
       utilities. 
 
       They also  provide considerably  more options and flexibility than the 
       previous  versions.  For  example,  to  import  a  "windowed"  set  of 
       coordinates, the  window is  now graphically picked on screen. And the 
       coordinate routines  remain compatible with the DCA/Softdesk method of 
       drawing orientation.  In fact,  they go  one step further, and provide 
       valid coordinate transfer regardless of the current UCS of the drawing 
       (DCA/Softdesk Civil  Version 12 only functions reliably in the "World" 
       coordinate system.) 
 
 
                         Importing BASIS Points to AutoCAD 
 
       If you've loaded BCOM, you can simply type IMP at AutoCAD's command 
       prompt to start the program. Alternately, you can manually load  the 
       program  into AutoCAD,  using the  "xload" function. At the AutoCAD 
       command prompt, type 
 
            (xload "basis") 
 
       This attaches  the BASIS.EXE  Application to  AutoCAD for  the current 
       AutoCAD session, until removed by typing 
 
            (xunload "basis") 


 
       After "xloading" BASIS.EXE, this function is available by entering the 
       expression 
 
            (import) 
 
       at the  AutoCAD command  prompt. The  parentheses must  be  typed,  as 
       shown. 
 
       The Import Dialog is used to set up the desired options for the import 
       process. Each  element of  the dialog box (or "control" in GUI jargon) 
       is discussed below. 
 
 
       "Data at:" 
 
       This is  the familiar  prompt  for  the  BASIS  cogo  data  directory. 
       Usually, the  default data  directory, as configured in the main BASIS 
       program, is  the one to use. However, you may wish to read a different 
       directory (such  as a floppy) on occasion.  You can activate the "Data 
       at" control  by tabbing  to it,  by pressing  the mnemonic  'D' on the 
       keyboard, or  by clicking  on it  with the mouse or digitizer. You can 
       either edit  the default  response, or  type in a completely different 
       directory. If  you type  in a  directory that  is  not  a  BASIS  data 
       directory (that  is, one  without a BASIS Catalog file) a warning will 
       appear, and  you will be asked to re-enter the directory name. As with 
       the other normal BASIS programs that prompt for this directory, do not 
       append a trailing backslash to the directory name. BASIS does this for 
       you. 
 
 
       "Project File:" 
 
       This field  contains the  name of  the BASIS  coordinate  file  to  be 
       accessed. Most  times, the  initial value  in this  field will  be the 
       BASIS coordinate  file that  was last  used. You can either accept the 
       default as  it appears,  or you  can tab  or click  onto the field, or 
       press the  mnemonic 'P'  on the  keyboard, and type in the name of the 
       desired field. 
 
       When importing  BASIS points to AutoCAD, if you call for a nonexistent 
       file, a  message box to that effect will appear, and will be given the 
       opportunity to re-enter the file name. 
 
       When exporting  AutoCAD points  to BASIS,  if you  call a  nonexistent 
       file, you will be given the opportunity to create it. The project file 
       creation dialog  is very similar to the standard BASIS "Create Project 
       File" routine,  except that  you  must  use  the  TAB  key,  mouse  or 
       digitizer puck  to move  forward or backward through the input fields. 
       When all  desired information  is entered,  press (or  click) the "OK" 
       button. 
 


 
       Import "Options" 
 
       This group  of "check  boxes", or "toggles" lets you enable or disable 
       the  available   Import  options.   These   consist   of   Elevations, 
       Descriptions, and  Window. Tab  or click  on the  field to  change, or 
       press the  appropriate mnemonic  letter (the underscored letter in the 
       control's label.)  You can  turn each  toggle "on"  or "off" by either 
       clicking on  the box,  or pressing  the space  bar when the item is in 
       focus (highlighted.)  An "X"  in the  box indicates that the option is 
       enabled. 
 
       The "Elevations"  option, if  enabled, will  import  BASIS  elevations 
       along with the horizontal position. The elevation values are stored as 
       attributes in  the POINT  or ALTPOINT  point blocks  that are inserted 
       into the  drawing. The  actual BASIS  point block  entities are always 
       inserted at  a drawing  elevation  of  zero  (0),  regardless  of  the 
       elevation attribute. 
 
       You will notice that as the "Elevations" options is toggled on or off, 
       the "Elevation  Precision" edit box and slider activate or disactivate 
       accordingly. With elevations on, you can use the edit box or slider to 
       set the  degree of precision for imported coordinates, between 0 and 8 
       decimal places of accuracy. 
 
       The "Descriptions"  option brings  in BASIS  descriptions, which  like 
       elevations, are saved as attributes of the POINT or ALTPOINT block. 
 
       The "Window"  toggle tells BASIS that you are only interested in those 
       points that  fall within  a  selected  rectangular  window.  When  you 
       activate the  Window option, you will notice that focus then shifts to 
       the "Window..."  button. Most  of the  time, you  will then press this 
       button to  enter or pick the window coordinates (similar to the "PLOT- 
       Window" procedure  in  the  drawing  plot  dialog.)  When  the  Window 
       Selection dialog appears, either enter the X and Y AutoCAD coordinates 
       for opposite  corners of the window (referenced to the current UCS) or 
       press the  "PICK<" button at the top left of the dialog box. This will 
       hide the  dialog box, and prompt for you to pick the window corners on 
       the screen.  After picking  the corners,  the dialog  reappears,  with 
       updated coordinates. Press "OK" to accept the selected window. 
 
 
       Import Point Selection Options 
 
       There are  two available  options for  selecting point  numbers to  be 
       imported: "Random"  and "Sequential." These are displayed as a pair of 
       "radio buttons".  When one  radio button  is "pressed" to activate it, 
       any other  active radio  button automatically  disactivates, like  the 
       station buttons  on a  car radio.  You turn  a  button  on  by  either 
       clicking on  it, or by tabbing to the group of buttons, and then using 
       the Cursor UP or Cursor DOWN directional keys. 
 
       If "Random"  point numbers are selected, you will be prompted to enter 
       individual points  during the  import process.  Each point number that 
       you enter  will import that point (provided it is in use.) Even if you 
       chose a  Window, you  will still be asked to provide the point numbers 
       of exactly  those points within the window that you want inserted. You 
       can enter  "Random" points  in any  order that you wish. If a point is 
       not within  the selected  window (if  one is selected), it will not be 
       imported.  The prompts for random point numbers will repeat, until you 
       either enter 'Q' for "Quit" or hit Ctrl-C. 
 
       "Sequential" point  numbers, rather  than requesting  individual point 
       numbers, will  request inclusive  start and  end points  for groups of 
       points to  be imported.  Again, if  a window  is selected,  only those 
       points within  the window  will be  imported. The prompts for starting 
       and ending  points will  repeat, until you either enter 'Q' for "Quit" 
       or hit CTRL-C to cancel further input. 
 
 
       Selecting Point Blocks 
 
       Another pair  of "radio  buttons" let  you select which one of the two 
       available point  block types  should be  used. Tab to the radio button 
       group and  use the  cursor UP or Down keys to make your selection. Or, 
       of course,  you can  click on  the desired  button (or  on the  iconic 
       image) to activate the desired style. 
 
       "Standard" point  blocks are  DCA/Softdesk compatible,  with the point 
       numbers on  layer PNTS, the elevations, if any, on layer ELEV, and the 
       description, if  any, on  layer DESC. The point node of the block, and 
       the block  itself, will  always come  in on  the current  layer in the 
       drawing. 
 
       "Current Layer" point blocks are also DCA/Softdesk compatible, but are 
       slightly different  than the  standard point  blocks. With these point 
       blocks, all  attributes come  in on  the current layer. The attributes 
       are also positioned on opposite sides of the node. 
 
 
       Why Bother Using Different Point Blocks? 
 
       Using both  styles of  points is  very handy  when there  are pairs of 
       coordinate  values  for  approximately  the  same  point,  such  as  a 
       theoretical map  coordinate, versus  an actual  field coordinate.  You 
       might choose  to bring  in all field-established points, such as found 
       monumentation and  control stations  as one  type of  point block, and 
       bring in  record information  as  the  other  type.  This  facilitates 
       controlling the  visibility of  either type  by layer,  permits better 
       filtering of  selection sets for groups of related points, and because 
       the attributes are positioned differently, reduces text collisions and 
       confusion for pairs of points that are very close to one another. 
 
 
                         Exporting AutoCAD Points to BASIS 
 
       If you've loaded BCOM, simply type EXP at AutoCAD's command prompt to 
       load and run the new export routine. Alternatively, you can load  the 
       program  into AutoCAD by using the  "xload" function. At the  AutoCAD 
       command prompt. Type 
 
            (xload "basis") 
 
       This attaches  the BASIS.EXE  Application to  AutoCAD for  the current 
       AutoCAD session, until removed by typing 
 
            (xunload "basis") 
 
 
       After "xloading" BASIS.EXE, this function is available by entering the 
       expression 
 
            (export) 
 
       at the  AutoCAD command  prompt. The  parentheses must  be  typed,  as 
       shown. 
 
       The Export Dialog is used to set up the desired options for the export 
       process. Each element of the dialog box is discussed below. 
 
 
       Export "Options" 
 
       These options  control which  values within  the point  blocks will be 
       written to  the BASIS  cogo file. Each option is toggled "on" or "off" 
       by clicking  on the  appropriate check  box. You  can also  tab to the 
       desired control,  or press  its mnemonic  code letter,  and press  the 
       space bar to toggle it. 
 
       The "Elevations"  option, if  enabled, will  export  BASIS  elevations 
       along with the horizontal position. The elevation values are stored as 
       attributes in  the POINT  or ALTPOINT  point blocks  that are inserted 
       into the  drawing. The elevation of a point has nothing to do with the 
       'Z' value  of the  blocks insertion  point. (The  BASIS import program 
       always inserts  BASIS point  block entities  at a drawing elevation of 
       zero (0), regardless of the elevation attribute.) 
 
       The "Descriptions" option exports descriptions to BASIS. Descriptions, 
       like elevations,  are saved  as attributes  of the  POINT or  ALTPOINT 
       block. Since  BASIS descriptions  are limited  to 10  characters,  any 
       description exceeding this limit will be truncated. 
 
       Enabling "Point  Protect" prevents points already in use in the target 
       BASIS file  from being  overwritten. Point  protect  will  not  let  a 
       drawing point overwrite a BASIS cogo point if: 
 
       1.   The northings  and eastings  differ by  an  amount  greater  than 
            0.000000001. 
 
       2.   The elevations (if selected) differ by greater than 0.000000001. 
 
       Note: Point  protection does  NOT consider  descriptions when checking 
       the status of an existing cogo point. 
 
       The "Warning"  option is  applicable only if Point Protect is enabled. 
       Thus, the  Warning checkbox is inactive unless Point Protect option is 
       checked. Warning,  if selected,  will display  a  prompt  whenever  an 
       overwrite condition  is detected,  advising that  the point is in use, 
       and giving you the choice of either overwriting the point, assigning a 
       new point number, or skipping the point by pressing Ctrl-C. 
 
 
       Export Point Selection Options 
 
       There are  three available  options for  selecting point numbers to be 
       exported: "Random," "Sequential," and "Selection." These are displayed 
       as a  group of  "radio buttons". When one radio button is "pressed" to 
       activate it, any other active radio button automatically disactivates. 
       You turn  a button  on by  either clicking on it, or by tabbing to the 
       group of  buttons, and  then  using  the  Cursor  UP  or  Cursor  DOWN 
       directional keys. 
 
       If "Random"  point numbers are selected, you will be prompted to enter 
       individual points  during the  export process.  Each point number that 
       you enter  will export that point (provided it is in the drawing.) You 
       can enter  "Random" points in any order that you wish. The prompts for 
       random point  numbers will  repeat, until  you either  enter  'Q'  for 
       "Quit" or hit Ctrl-C. 
 
       "Sequential" point  numbers, rather  than requesting  individual point 
       numbers, will  request inclusive  start and  end points  for groups of 
       points to be exported. The prompts for starting and ending points will 
       repeat, until  you either enter 'Q' for "Quit" or hit CTRL-C to cancel 
       further input. 
 
       Exporting by  "Selection"  brings  up  the  familiar  AutoCAD  "Select 
       Objects:" prompt.  You can  select by  any of  the standard  selection 
       methods,  including   window,  crossing,  previous,  etc.  Only  those 
       entities that  are legitimate  point blocks (standard or current-layer 
       types) will  be filtered  out of  the selected  items and  exported to 
       BASIS (subject to point protect, if selected.) 
 
 
                               ADS Drafting Sequence 
 
       The  new  BASIS  Drafting  Sequence  program,  BASISSEQ.EXE  has  been 
       designed to  provide a  simpler alternative  to the original, external 
       program supplied  with BASIS  2.4. This new program runs entirely from 
       within AutoCAD, and can create lines or polylines from point sequences 
       entered at AutoCAD's command prompt. 
 
       To start the sequence program, either type SEQ at the command prompt 
       (if you've loaded BCOM) or use the  "xload" function  at the 
       AutoCAD command prompt. Type 
 
            (xload "basisseq") 
 
       This attaches  the BASISSEQ.EXE Application to AutoCAD for the current 
       AutoCAD session, until removed by typing 
 
            (xunload "basisseq") 
 
       To start  drawing lines,  arcs and polylines by BASIS coordinate point 
       numbers, type 
 
            (Draw) 
 
       at the AutoCAD command prompt. 
 
       When the  program executes,  a dialog  box appears,  in which  you can 
       enter a BASIS data directory and BASIS project file name. The defaults 
       are the system default data directory, and the current default project 
       file, either  the drawing's  or the  BASIS  system  default.  (If  the 
       drawing is  a new  drawing, the  first time  that you  use the  "Draw" 
       program, the system default will be displayed.) 
 
       Either accept the default information, or tab to the desired field (or 
       click, or use the mnemonic code letters, shown underlined in the field 
       labels) and retype the desired values. When satisfied, click on the OK 
       button. If  you are  accepting the default information, you can simply 
       press ENTER if the project filename field is highlighted. This has the 
       same effect as pressing the OK button. 
 
 
                                Lines vs. Polylines 
 
       Depending on  what is  being drawn,  you may  choose  either  LINE  or 
       POLYLINE entities.  At the  AutoCAD command  prompt, you will be asked 
       which type  you want.  Whichever you select, you always can go back to 
       this prompt and select the other, so it is possible to draw both types 
       of entities  in a single run of the Draw program. The following prompt 
       will appear: 
 
            BASIS Sequence - /Help/Quit/Plines/<Lines>: 
 
       To select  LINES (which  includes ARC  segments, also)  type L  at the 
       prompt, and  press ENTER.  For POLYLINES (including poly-arc segments) 
       type P.  If you  are finished,  or wish  to cancel,  type Q  and press 
       enter. You  can also  quit by  pressing Ctrl-C.  If you want to review 
       Help documentation, type H and press ENTER. 
 
 
 
                               Entering Point Numbers 
 
       Note: You  do not  have to  import BASIS  points  to  use  the  "Draw" 
       routine.  The  program  uses  the  coordinates  stored  in  the  BASIS 
       coordinate file to create the drawing entities. 
 
       After selecting  the entity type, the program begins prompting for the 
       BASIS point numbers to connect. For example 
 
            [Lines] From Point# (- if PC) /Layer/Help/Quit/<>: 
 
       might appear.  Points are entered in a fashion similar to a BASIS area 
       computation. If the point is the PC of a curve, enter it as a negative 
       number. To  quit, type  Q and  press ENTER or press Ctrl-C. Type H and 
       press ENTER for Help documentation. 
 
       You can  also change layers at this time, if desired. Type L and press 
       ENTER. You  will be  prompted for  the new  layer (which  must  be  an 
       existing layer.)  Enter the  new layer name and press ENTER. Note that 
       changing layers  disrupts the  continuity of  a polyline,  causing the 
       polyline in progress to end at the last point before the layer change, 
       and a new one to be started at the point following the layer change. 
 
       The next  prompt depends  on whether or not a curve is being drawn. If 
       not, the next prompt simply requests the next point number. 
 
            [Lines] To Point# /Quit/Thru/<>: 
 
       You can  enter the next point number for a single line segment, or you 
       can type  T (for  "Thru") and  press ENTER.  If you  choose the "Thru" 
       option, the  next prompt requests the endpoint for a sequential series 
       of line segments. 
 
            [Lines] Thru Point# /Quit/<>: 
 
       You will  notice that  the "<>"  characters enclose a probable default 
       response. Either  accept the default by simply pressing ENTER, or type 
       in your point number. Again, either Q or Ctrl-C quits, and returns you 
       back to the previous prompt level for entity type. 
 
       If you  entered a PC (as a negative number) at a "From Point#" prompt, 
       the following prompts appear. 
 
       First 
 
            [Lines] PT Point# /Quit/<>: 
 
       appears, and then 
 
            [Lines] Radius Point# (- if CCW) /Quit/<>: 
 
       If the curve breaks left, enter the radius point number as a negative. 
 
 
                                 Polyline Sequences 
 
       Polyline sequences  are created  exactly the  same way  as simple line 
       sequences.  However,  in  order  for  the  program  to  create  single 
       continuous polylines,  including curved  segments, you  must enter the 
       polyline as a series of continuous points. 
 
       Don't start at one end, stop in the middle, and come in from the other 
       end and  expect BASIS  or AutoCAD  to understand that this is a single 
       polyline! This  doesn't matter when entering simple LINE entities, but 
       it might matter to you if you want your POLYLINE's to be joined. 

