MatchObjectAttributes

Matches, or copies, the attributes of a source object to a target object or an array of target objects. If the source object is not specified, the attributes of the target object(s) will be reset to Rhino's default object attributes.

Syntax

rhinoscriptsyntax.MatchObjectAttributes(target_ids, source_id=None)

rhinoscript.object.MatchObjectAttributes(target_ids, source_id=None)

Parameters

target_ids

Required.  String, Guid or List of Guids.  The identifier(s) of the target object(s).

source_id

Optional.  String or Guid.  The identifier of the source object.  If the source object is not specified, the attributes of the target object(s) will be reset to Rhino's default object attributes.

Returns

Number

The number of objects whose attributes were modified if successful.

Example

import rhinoscriptsyntax as rs

targets = rs.GetObjects("Select objects")

if targets:

    source = rs.GetObject("Select object to match")

    if source: rs.MatchObjectAttributes( targets, source )

Also See

GetObject

GetObjects