Type: IBaseProject

Summary:

Base project class. Contains common methods and properties The project is itself an object (inherits from IBaseObject)

Remarks:

Methods:

AddManager(IBaseManager)

Summary:

Adds a manager to the project

Parameters:

  1. managerToAdd: manager to add

Open(System.String,ObjectReadCallback,System.Collections.Generic.List{System.String}@)

Summary:

Open project file

Parameters:

  1. fileName: project file to open
  2. callBack: a callback each time an object is read from the project file
  3. errorList: a list of all error found during loading.

Close

Summary:

Closes the project

Save

Summary:

Save current project to existing file name

SaveAs(System.String)

Summary:

save project as

Parameters:

  1. fileName: filename where to save project

Get(System.String)

Summary:

Gets an object by name (in all the project)

Parameters:

  1. name: name to serach for

Returns:

Found object. Will be null if not found

GetObjectById(System.Guid)

Summary:

Gets an object by Global ID (in all the project)

Parameters:

  1. guid: global id to search for

Returns:

Found object. Will be null if not found

RemoveObject(IBaseObject)

Summary:

Removes an object form the project

Parameters:

  1. obj: Object to remove

Returns:

true if success

RemoveObjects(System.Collections.IList)

Summary:

Removes a list of object from the project

Parameters:

  1. objects: list of objects to remove

Returns:

true if success

GetManagerByObjectTypeName(System.String)

Summary:

Gets a manager by the object type name

Parameters:

  1. objectTypeName:

GetObjectManager(IBaseObject)

Summary:

Gets a manager from an object

Parameters:

  1. obj:

PasteFromClipboard

Summary:

Pastes object from clipboard

CopyToClipboard(System.Collections.ICollection)

Summary:

Copies a collection of object to clipboard

Parameters:

  1. objects:

CopyToClipboard

Summary:

Copies the object to clipboard

ToCSVString(System.Char)

Summary:

Returns the object in a CSV string.

Returns:

A string that contains properties of the object in a CSV format.

GetUserPropertyInstance(System.String)

Summary:

Gets the user property instance of the specified name

Parameters:

  1. userPropertyName: The user property name.

Returns:

Returns the user property instance object. If not found, the methods returns null.

Example:

This example shows how to set the value of a user property by using this method

            cc1 = Project.Equipment.Get("CC1");
            
            // get the value of a user property using the method
            userPropertyInstance = cc1.GetUserPropertyInstance("UserProperty1");
            if(userPropertyInstance != null) {
               userPropertyInstance.Value = 3;
            }
            

IsUserProperty(System.String)

Summary:

Indicates if the object contains a user property with the name you specify

Parameters:

  1. userPropertyName: user property name

Returns:

Returns true if the object contains a user property with the name you specified in parameter.

GetUserPropertyValue(System.String)

Summary:

Gets the value of a user property. A better way to get the value of a user property is to use the indexer operator [], see example. Instead of using the method 'GetUserPropertyInstance' and then access the 'Value' property of the returned value, this method simplifies the way we get the value of a user property.

Parameters:

  1. userPropertyName: The name of the user property to set.

Returns:

Returns null if user property is not found. Otherwise returns the value of the user property.

Example:

This example shows how to get the value of a user property using this method and also by using the indexer

            cc1 = Project.Equipment.Get("CC1");
            
            // get the value of a user property using the method
            val = cc1.GetUserPropertyValue("UserProperty1");
            
            // get the value of a user property using the indexer operator
            val = cc1["UserProperty1"];
            

SetUserPropertyValue(System.String,System.Object)

Summary:

Sets the value of a user property. A better way to set the value of a user property is to use the indexer operator [], see example. Instead of using the method 'GetUserPropertyInstance' and then access the 'Value' property of the returned value, this method simplifies the way we set the value of a user property.

Parameters:

  1. userPropertyName: The name of the user property to set.
  2. value: If the user property is not found, this methods does nothing.

Example:

This example shows how to set the value of a user property using this method and also by using the indexer

            cc1 = Project.Equipment.Get("CC1");
            
            // set the value of a user property using the method
            cc1.SetUserPropertyValue("UserProperty1", 3);
            
            // set the value of a user property using the indexer operator
            cc1["UserProperty1"] = 3;
            

ToXmlString

Summary:

Converts the object in an xml string

Returns:

the string that contains xml version of the object

FromXmlString(System.String)

Summary:

Init object from xml. All properties found in the xml will be set with the value in the xml file

Parameters:

  1. xmlText: Xml string

Properties

Product

Summary:

Gets product

Type:

Sym3SuiteProduct

Access:

Read

DistanceUnit

Summary:

Gets the distance unit for the project This example shows you how to get the unit // get project to use foot if(Project.DistanceUnit == BCS.DistanceUnit.Imperial) print("Imperial units") if(Project.DistanceUnit == BCS.DistanceUnit.Metrics) print("Metrics units")

Type:

DistanceUnit

Access:

Read

Managers

Summary:

Gets a dictionnary of all instance of managers

Type:

System.Collections.IDictionary

Access:

Read

ProjectFileVersion

Summary:

Gets project file version. This version is incremented each time a modification is done in the project file structure/format

Type:

System.Int32

Access:

Read

CurrentProjectVersion

Summary:

Gets current project version

Type:

System.Int32

Access:

Read

ApplicationSavedVersion

Summary:

Get application saved version

Type:

System.String

Access:

Read

ModificationState

Summary:

Gets or sets project state (modified or not)

Type:

ProjectModificationState

Access:

Read and Write

UserProperties

Summary:

Gets the user properties manager

Type:

IUserPropertyManager

Access:

Read

SelectionService

Summary:

Gets the selection service

Type:

IObjectSelectionService

Access:

Read

Version

Summary:

Gets or sets project version - information only

Type:

System.String

Access:

Read and Write

Author

Summary:

Gets or sets project author - information only

Type:

System.String

Access:

Read and Write

Description

Summary:

Gets or sets project description - information only

Type:

System.String

Access:

Read and Write

ProjectGuid

Summary:

Gets project global ID

Type:

System.String

Access:

Read

Id

Summary:

Gets the globally unique identifier (GUID) id of the object. This unique identifier is generated once at the object creation. This id will be kept unique for the entire life of the object, event after saving/loading the project.

Type:

System.Guid

Access:

Read

Example:

This example shows how to get the id of an object in a string format. The following script will output a string like 'b3122ae0-dcf7-43b6-b17c-5381afaca5cb'

            strid = Project.Colors.Get("myColor").Id.ToString();
            print(strid)
            

Name

Summary:

Gets or sets the name of the object. All objects of the same type have a unique name.

Type:

System.String

Access:

Read and Write

Example:

This example shows how to get and set the name of an object.

            // get the color name
            colorname = Project.Colors.Get("myColor").Name;
            
            // set the color name
            Project.Colors.Get("myColor").Name = "myNewName";
            

TypeName

Summary:

Gets the typename of the object. A type name doesn't contain any space characters.

Type:

System.String

Access:

Read

DisplayTypeName

Summary:

Gets the display name of the type name of the object. It returns the english display name of the type name.

Type:

System.String

Access:

Read

BaseProject

Summary:

Gets the project

Type:

IBaseProject

Access:

Read

UserPropertyInstances

Summary:

Gets a list of all the instances of user properties.

Type:

System.Collections.ObjectModel.ObservableCollection`1[BCS.IUserPropertyInstance]

Access:

Read