ObjectLinetypeSource

Returns or modifies the linetype source of an object.   The linetype used to display objects is specified in one of three ways:

  1. Linetype from layer.  The object's layer determines the object's linetype.

  2. Linetype from object. The object's linetype is set by the object itself.

  3. Linetype from parent.  For objects with parents, like objects in block instances, use parent's linetype. If no parent, treats as linetype from layer.

Syntax

rhinoscriptsyntax.ObjectLinetypeSource (object_ids, source=None)

rhinoscript.object.ObjectLinetypeSource (object_ids, source=None)

Parameters

object_ids

Required.  String, Guid, or list of Giuds. Object identifier(s).

source

Optional.  Number.  The new linetype source.  If omitted, the current linetype source is returned.  Note, if object_ids is specified as a list, source is required.

Value

Description

0

Layer.  Use the object's layer linetype.

1

Object.  Use the object's linetype.

2

<unused>

3

Parent.  Use the parent object's linetype.

Returns

Number

If a linetype source is not specified,  the current linetype source if successful.

Number

If a linetype source is specified, the previous linetype source if successful.

Number

If object_ids is specified as a list, then the number of objects modified if successful.

Example

import rhinoscriptsyntax as rs

objects = rs.GetObjects("Select objects to reset linetype source")

if objects:

    for obj in objects: rs.ObjectLinetypeSource( obj, 0 )

Also See

ObjectLinetype