Selva Compute API Reference - v2.1.0
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    color: object

    Gets or sets the display color for this layer in js object format: {r:number, g:number, b:number)} where number is from 0 - 255

    expanded: boolean
    fullPath: string

    Gets the full path to this layer. The full path includes nesting information.

    id: string

    Gets or sets the ID of this layer object. You typically do not need to assign a custom ID.

    igesLevel: number

    Gets or sets the IGES level for this layer.

    index: number
    isValid: boolean

    Tests an object to see if it is valid.

    isValidWithLog: [boolean, string]

    ...

    linetypeIndex: number

    Gets or sets the line-type index for this layer.

    locked: boolean
    name: string

    Gets or sets the name of this layer.

    parentLayerId: string

    Gets the ID of the parent layer. Layers can be organized in a hierarchical structure, in which case this returns the parent layer ID. If the layer has no parent, Guid.Empty will be returned.

    plotColor: object

    Gets or sets the plot color for this layer in js object format: {r:number, g:number, b:number)} where number is from 0 - 255

    plotWeight: number

    Gets or sets the weight of the plotting pen in millimeters. A weight of 0.0 indicates the "default" pen weight should be used. A weight of -1.0 indicates the layer should not be printed.

    renderMaterialIndex: number

    Gets or sets the index of render material for objects on this layer that have MaterialSource() == MaterialFromLayer. A material index of -1 indicates no material has been assigned and the material created by the default Material constructor should be used.

    userStringCount: number

    Gets the amount of user strings.

    visible: boolean

    Methods

    • Parameters

      • viewportId: string

        If not Guid.Empty, then the setting for this viewport will be deleted. If Guid.Empty, the all per viewport layer color settings will be removed.

      Returns void

      Remove any per viewport layer color setting so the layer's overall setting will be used for all viewports.

    • Parameters

      • viewportId: string

        If not Guid.Empty, then the settings for that viewport are deleted. If Guid.Empty, then all per viewport settings are deleted.

      Returns void

      Deletes per viewport layer settings.

    • ...

      Returns void

    • Returns boolean

      The persistent locking setting is used for layers that can be locked by a "parent" object. A common case is when a layer is a child layer (Layer.ParentI is not nil). In this case, when a parent layer is locked, then child layers are also locked. The persistent locking setting determines what happens when the parent is unlocked again.

    • Returns boolean

      The global persistent visibility setting is used for layers whose visibility can be changed by a "parent" object. A common case is when a layer is a child layer (ParentId is not nil). In this case, when a parent layer is turned off, then child layers are also turned off. The persistent visibility setting determines what happens when the parent is turned on again.

    • Parameters

      • key: string

        id used to retrieve the string.

      Returns string

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

      Gets user string from this geometry.

    • Returns string[]

      Gets a copy of all (user key string, user value string) pairs attached to this geometry.

    • Parameters

      • viewportId: string

        If not Guid.Empty, then checks for settings for that specific viewport. If Guid.Empty, then checks for any viewport settings.

      Returns boolean

      True if the layer has per viewport settings, false otherwise.

      Verifies that a layer has per viewport settings.

    • Parameters

      • viewportId: string

        If not Guid.Empty, then the setting applies only to the viewport with the specified id.

      Returns object

      The display color in js object format: {r:number, g:number, b:number)} where number is from 0 - 255

      Gets the display color for this layer.

    • ...

      Returns string

    • Returns void

      Set the persistent locking setting for this layer

    • Returns void

      Set the global persistent visibility setting for this layer.

    • Parameters

      • viewportId: string

        If not Guid.Empty, then the setting applies only to the viewport with the specified id.

      • color: object

        The display color in js object format: {r:number, g:number, b:number)} where number is from 0 - 255

      Returns void

      Sets the display color for this layer.

    • Parameters

      • key: string

        id used to retrieve this string.

      • value: string

        string associated with key.

      Returns boolean

      true if successful, false if not.

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

    • Returns string

      Create a JSON string representation of this object

    • Returns void

      Remove any explicitly persistent locking settings from this layer

    • Returns void

      Remove any explicit persistent visibility setting from this layer

    • 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

      Decodes a Rhino Object