Description

A line segment defined by start and end points


BobCAD API supports 2 different table key definition formats for flexibility in coding.

Keys

The following Keys can be created inside a table to form a line entity:

Format 1 Keys

  • xStart – double value of the X coordinate of the beginning of the line
  • yStart – double value of the Y coordinate of the beginning of the line
  • zStart – double value of the Z coordinate of the beginning of the line
  • xEnd – double value of the X coordinate of the end of the line
  • yEnd – double value of the Y coordinate of the end of the line
  • zEnd – double value of the  Z coordinate of the end of the line

Format 2 Keys

  • StartPoint – a table consisting of 3 double positions representing X,Y,Z coordinates of the beginning of the line
  • EndPoint – a table consisting of 3 double positions representing X,Y,Z coordinates of the end of the line

Keys in both Format 1 and 2

  • Type="Line" - Defines this table as a line type entity
  • LineStyle – string value defining the entity line style used.  Possible values can be:
    • None – This will utilize the active document linestyle – Same as omitting this parameter
    • Solid
    • Dash
    • Dot
    • DashDot
    • DashDotDot

Example

Format 1


--Minimal definition

myLine = { Type="Line", xStart=-20, yStart=-20, zStart=0, xEnd=-20, yEnd=30.0, zEnd=0.0 }


--Complete definition

myLine = { CmdName="My Line", Type="Line", xStart=-20, yStart=-20, zStart=0, xEnd=-20, yEnd=30.0, zEnd=0.0, Layer="Layer Name", Color="Blue", LineStyle="Solid" }


Format 2


--Minimal definition

myLine = { Type="Line", StartPoint={1.0,1.0,1.0}, EndPoint={1.0,1.0,1.0} }


--Complete definition

myLine = { CmdName="My Line", Type="Line", StartPoint={1.0,1.0,1.0}, EndPoint={1.0,1.0,1.0}, Layer="Layer Name", Color="Blue", LineStyle="Solid" }