References > Creo Schematics 4.0 API Guide > The Design Package > Class Design
  
Class Design
This concrete class represents the top level owner of everything in a single design.
Only one design can be open at any time.
public class Design
extends rsdesigner.design.DGClass
Hierarchical Diagram
Direct Known Subclasses
None
Constructor
None
Methods
getCurrentDesign
Returns the currently open design, or null if no design is open.
public static Design getCurrentDesign()
getName
Returns the name of the design.
public String getName()
Throws: RSDException
getDesignSheets
Returns an iterator of all the design sheets in the design. Each element in the iterator is a one-element array that contains design sheet related information.
public Iterator getDesignSheets()
Throws: RSDException
getBlocks
Returns an iterator of the blocks in the design. Each element in the iterator is a one-element array that contains block related information. If neither includeDesign nor includeCatalog are true, the iterator is empty.
public Iterator getBlocks(booleanincludeDesign, boolean includeCatalog)
Where:
includeDesign—Flag to indicate that design blocks must be included.
includeCatalog—Flag to indicate that catalog blocks must be included.
Throws: RSDException
getFibres
Returns an iterator of the fibers in the design. Each element in the iterator is a one-element array that contains fibre related information. If neither includeDesign nor includeCatalog are true, the iterator is empty.
public Iterator getFibres(boolean includeDesign, boolean includeCatalog)
Where:
includeDesign—Flag to indicate that design fibers must be included.
includeCatalog—Flag to indicate that catalog fibers must be included.
Throws: RSDException
getGroups
Returns an iterator of the groups in the design. Each element in the iterator is a one-element array that contains group related information. If neither includeDesign nor includeCatalog are true, the iterator is empty.
public Iterator getGroups(boolean includeDesign, boolean includeCatalog)
Where:
includeDesign—Flag to indicate that design groups must be included.
includeCatalog—Flag to indicate that catalog groups must be included.
Throws: RSDException
getPorts
Returns an iterator of the ports in the design. Each element in the iterator is a one-element array that contains port related information. If neither includeDesign nor includeCatalog are true, the iterator is empty.
public Iterator getPorts(boolean includeDesign, boolean includeCatalog)
Where:
includeDesign—Flag to indicate that design ports must be included.
includeCatalog—Flag to indicate that catalog ports must be included.
Throws: RSDException
select
Returns an iterator of the PropertySet in the design that match the specified conditions in the partition specified by the SearchFlag parameter.
public Iterator select(Condition[] conditionList, SortSpec[] sortList, String[] classList, SelectFilter preFilter, SelectFilter postFilter, SearchFlag searchFlag)
Where:
conditionList—An array of conditions that have been combined using the AND condition to make the criteria by which items are selected.
sortList—An array of SortSpec that specifies the order in which selected items should be sorted.
classList—An array of strings that name the classes that must be searched.
preFilter—A fast filter called after the first condition has been applied, but before the remaining conditions are applied.
postFilter—A slow filter called after all conditions have been applied.
searchFlag—An optional parameter that sets the partition to search. Values allowed are described in the following table.
Search Flag Parameter Value
Description
All (default)
Searches for items in the design, internal, and external catalogs.
DesignOnly
Searches for items only in the design.
InternalCatalogOnly
Searches for items only in the internal catalog.
ExternalInternalCatalogOnly
Searches for items only in the internal and external catalogs.
DesignInternalCatalogOnly
Searches for items only in the design and the internal catalog.
ExternalCatalogOnly
Searches for items only in the external catalog.
DesignExternalCatalogOnly
Searches for items only in the design and the external catalog
* 
Filters are user-defined objects that are used to filter out unwanted PropertySets from the set selected by the Select method. The Select method selects an initial set of PropertySets from the database using one of the supplied conditions. Each property set is then passed any supplied preFilter. If it matches the filtering conditions set by the supplied preFilter, it is passed through the remaining conditions, and finally through any supplied postFilter.
Throws: RSDException
getSynchronizeObject
Returns a Java class object that can be synchronized with for thread-safe access to Creo Schematics.
public static Class getSynchronizeObject()
getClassString
Returns the name of the class of which the design is an instance.
public String getClassString()
Throws: RSDException
getLayers
Collection of Layer objects that represents layers that exist in the current design.
public java.util.Set getLayers()
Throws: rsdesigner.javagateway.RSDException if unable to retrieve a list of layers from the design.
getLayerByName
Retrieves a layer by name as a Layer object. When this method is called, it is guaranteed that this layer exists.
public rsdesigner.design.Layer getLayerByName (String name)
Where:
name—name of the target layer.
Returns: Layer object
Throws: RSDException on internal error, or if layer wasn’t found.
checkDGClass
Checks whether the design is a valid instance of a class.
public void checkDGClass()
Throws: RSDException
isCaching
Checks for central catalog caching. Returns true if caching is in progress. false otherwise.
public static boolean isCaching()
getDatatables
Searches the internal and external catalogs for datatables with at least one dataset that complies with the list of conditions. Returns an iterator of PropertySet objects which can be a datatable object for an internal catalog item or a CCItem object for a central catalog item.
public Iterator getDatatables(Condition()conditionList , boolean includeInternalCatalog, boolean includeExternalCatalog)
Where:
conditionList—A list of 3 strings. The first is the parameter name, the second is the operator (eq, lt, le, gt, ge, or match) the is third the parameter value. When the operator is match, the value can be any regular expression.
includeInternalCatalog—If true, searches the internal catalog and external catalog items loaded and included in the design.
includeExternalCatalog—If true, searches the entire external catalog.
getDatatables
Searches the internal and external catalogs for datatables without filtering.
public Iterator getDatatables(boolean includeExternalCatalog), boolean includeInternalCatalog)
Where:
includeInternalCatalog—If true, searches the internal catalog and external catalog items loaded and included in the design.
includeExternalCatalog—If true, searches the entire external catalog.
getAssociatesItemsList
Returns a list of catalog items that uses the PropertySet object.
Public ArrayList<PropertySet>getAssocatesItemsList(PropertySet pset,ArrayList <String> classList, boolean includeInternalCatalog, boolean includeExternalCatalog)
Where:
pset—A property set that is an instance of a datatable or a central catalog item representing a datatable object.
classList—A list of classes to search on.
includeInternalCatalog—If true, searches the internal catalog and external catalog items loaded and included in the design.
includeExternalCatalog—If true, searches the entire external catalog.
Throws: RSDException
getAssociatesItems
Returns an iterator of PropertySet.
Iterator getAssociatesItems(PropertySet pset, boolean includeInternalCatalog, boolean includeExternalCatalog)
Where:
pset—A property set that is an instance of a datatable or a central catalog item representing a datatable object.
includeInternalCatalog—If true, searches the internal catalog and external catalog items loaded and included in the design.
includeExternalCatalog—If true, searches the entire external catalog.
getBlocksVector
Returns a vector of blocks in this design.
public Vector<Block> getBlocksVector(boolean includeDesign, includeCatalog, boolean expandVector)
includeDesign—A flag to indicate that all blocks in the design are included.
includeCatalog—A flag to indicate that all blocks in the catalog are included.
expandVector (optional with a default of false)—A flag to indicate that the output is more specific. When true, the output is the Vector of Blocks. When false, the output is a vector of array objects.
Throws: RSDException
getGroupsVector
Returns a vector of groups in this design.
public Vector<Group> getGroupsVector(boolean includeDesign, includeCatalog, boolean expandVector)
includeDesign—A flag to indicate that all groups in the design are included.
includeCatalog—A flag to indicate that all groups in the catalog are included.
expandVector (optional with a default of false)—A flag to indicate that the output is more specific. When true, the output is the Vector of Groups. When false, the output is a vector of array objects.
Throws: RSDException
getFibresVector
public Vector<Fibre> getFibresVector(boolean includeDesign, includeCatalog, boolean expandVector)
includeDesign—A flag to indicate that all fibers in the design are included.
includeCatalog—A flag to indicate that all fibers in the catalog are included.
expandVector (optional with a default of false)—A flag to indicate that the output is more specific. When true, the output is the Vector of Fibres. When false, the output is a vector of array objects.
Throws: RSDException
Methods Inherited
The methods inherited from other classes are:
Class
Methods Inherited
java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait