Class Linetype

Hierarchy (view full)

Constructors

Properties

id: string

Gets or sets the ID of the current instance.

index: number
isSystemComponent: boolean

True if this model component is a system constant. An incomplete list of system constant model components is below:ON_ModelComponent::Unset ON_InstanceDefinition::Empty ON_Linetype::UnsetON_Linetype::ContinuousON_Linetype::ByLayerON_Linetype::ByParent ON_Layer::UnsetON_Layer::Default ON_TextStyle::UnsetON_TextStyle::DefaultON_TextStyle::ByLayerON_TextStyle::ByParent ON_DimStyle::UnsetON_DimStyle::DefaultON_DimStyle::DefaultInchDecimalON_DimStyle::DefaultInchFractionalON_DimStyle::DefaultFootInchArchitectureON_DimStyle::DefaultMillimeterSmallON_DimStyle::DefaultMillimeterLargeON_DimStyle::DefaultMillimeterArchitecture

isValid: boolean

Tests an object to see if it is valid.

isValidWithLog: [boolean, string]

...

name: string

The name of this linetype.

patternLength: number

Total length of one repeat of the pattern.

segmentCount: number

Number of segments in the pattern.

userStringCount: number

Gets the amount of user strings.

Methods

  • Parameters

    • length: number

      The length of the segment to be added.

    • isSolid: boolean

      If true, the length is interpreted as a line. If false, then the length is interpreted as a space.

    Returns number

    Index of the added segment.

    Description

    Adds a segment to the pattern.

  • Parameters

    • currentRemainder: number

      The current remainder value.

    Returns number

    The updated remainder value.

    Description

    Increments the Cyclic Redundancy Check value by this instance.

  • Parameters

    • index: number

      Zero based index of the segment.

    Returns object

    [void, number, boolean] (void) (number) The length of the segment in millimeters. (boolean) If the length is interpreted as a line, true is assigned during the call to this out parameter. If the length is interpreted as a space, then false is assigned during the call to this out parameter.

    Description

    Gets the segment information at a index.

  • Parameters

    • key: string

      id used to retrieve the string.

    Returns string

    string associated with the key if successful. null if no key was found.

    Description

    Gets user string from this geometry.

  • Parameters

    • index: number

      Zero based index of the segment to remove.

    Returns boolean

    true if the segment index was removed.

    Description

    Removes a segment in the linetype.

  • Parameters

    • index: number

      Zero based index of the segment.

    • length: number

      The length of the segment to be added in millimeters.

    • isSolid: boolean

      If true, the length is interpreted as a line. If false, then the length is interpreted as a space.

    Returns boolean

    true if the operation was successful; otherwise false.

    Description

    Sets the length and type of the segment at index.

  • Parameters

    • key: string

      id used to retrieve this string.

    • value: string

      string associated with key.

    Returns boolean

    true if successful, false if not.

    Description

    Attach a user string (key,value combination) to this geometry.

  • Parameters

    • json: object

      A json formatted object in the following format (values are orientative):

      {
      version: 10000,
      archive3dm: 60,
      opennurbs: -1877964208,
      data: 'encoded 3dm object data'
      }

    Returns CommonObject

    Description

    Decodes a Rhino Object

Generated using TypeDoc