SilverScreen Solid Modeler

Property Library Commands

Property Library Commands

Previous topic Next topic  

Property Library Commands

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

Property Library Commands

 

 


This topic gives the syntax for SilverScreen commands that work with property libraries. They may be used with the SilverScreen API routine ss_command , or a macro, or script file, to control the appearance of geometry in a drawing.

 

 


Property Save Command

 

The property save command will extract the appearance properties from a primitive or entity, and then save them as a material in a library.

 

The syntax of the property save command is:

 

property save library <prp path> name <material name>

        [<entity-path> | <prim-path>] description "<material description>"

 

Command option

Description

<prp path>

The path to the property library. If no path is specified, the library directory is assumed. If no extension is specified, the extension ".prp" is assumed. If the path contains spaces, then it must be quoted in the command. If the path specifies an existing property library, then the  save command will add the material to the library.

<material name>

The name the material will be given in the property library. If the property library path specified was to an existing library, and the material name is already in use, then the material in the library will be replaced with the appearance properties of the entity or primitive. Otherwise, a new material will be added to the property library.

<entity-path> |

<prim-path>

The path to either a SilverScreen bos-level entity, such as an object, or to a primitive, such as a polygon, from which the appearance properties will be extracted. There will be a command error if the relevant entity or primitive does not exist.

<material description>

A quote-delimited text string that describes the material being saved. The purpose of the description is to aid the user in knowing the materials purpose when selecting a material. It should be a concise description.

 

Example:

 

The following command would extract the appearance properties from the object "\wall\wall1\shell" and store them in a property library called "building" and a material called "clapboards".

 

property save library building.prp name clapboards object \wall\wall1\shell

             description "Applies clapboards to an external wall"

 

 


Property Assign Command

 

The property assign command will assign appearance properties from a material in a property library to a primitive or entity.

 

The syntax of the property assign command is:

 

property assign library <prp path> name <material name>

       [<entity-path> | <prim-path>] {<appearance filters>}

 

Command option

Description

<prp path>

The path to an existing property library in which the material being assigned resides. If the library does not exist there will be a command error.  If no path is specified, the library directory is assumed. If no extension is specified, the extension ".prp" is assumed. If the path contains spaces, then it must be quoted in the command.

<material name>

The name the material being assigned. If the material does not exist in the specified library there will be a command error.

<entity-path> |

<prim-path>

The path to either a SilverScreen bos-level entity, such as an object, or to a primitive, such as a polygon, which will be assigned the material. There will be a command error if the relevant entity or primitive does not exist.

<appearance filters>

Appearance filters are optional and control which properties are assigned from the material library. If appearance filters are not supplied, then all properties in the material are assigned. If multiple filters are used they should be separated by spaces. The filters have the following meaning:

 

Name

Meaning

edge

Edge properties (i.e. color, width, linestyle) are assigned to the entity or primitive.

surface

Surface properties (i.e. fill-color, pattern) are assigned to the entity or primitive.

shade

Shading properties (i.e. ambience, diffusion, gloss) are assigned to the entity or primitive

text

Text properties (i.e. font, weight) are assigned to the entity, which must be a text-node to avoid a syntax error

texture

Texture properties (i.e. image, dimensions, mapping) are assigned to the entity or primitive.

renderman

Renderman shaders are assigned to the entity or primitive.

 

Example

 

The following command would extract the appearance properties from a material called "clapboards" in a library called "building" and assign them all to object "\walls\wall1\shell":

 

property assign library building name clapboards object \walls\wall1\shell

 

The following command would extract only the surface properties and assign them:

 

property assign library building name clapboards object \walls\wall1\shell surface

 

 


Property Copy Command

 

The property copy command will copy appearance properties from an entity or primitive to an entity or primitive. Only applicable properties will be transferred from one to the other.

 

The syntax of the property copy command is:

 

property copy from [<bos-path>|<node-path>] to [<bos-path>|<node-path>]

 

Command option

Description

from [<entity-path> |

         <prim-path>]

The path to either a SilverScreen bos-level entity, such as an object, or to a primitive, such as a polygon, from which the appearance properties will be extracted. There will be a command error if the relevant entity or primitive does not exist.

to [<entity-path> |

    <prim-path>]

The path to either a SilverScreen bos-level entity, such as an object, or to a primitive, such as a polygon, to which the appearance properties will be assigned. There will be a command error if the relevant entity or primitive does not exist.

 

Example

 

The following command would extract the appearance properties from the object "\walls\wall1\shell" and assign them to the object "\walls\wall2\shell". Both objects must exist in the current drawing in order for the command to succeed.

 

property copy from object \walls\wall1\shell to object \walls\wall2\shell

 

 


 

 


 

 

 

 

 

: