LayoutHost General Methods
GetDefinitionType()
Returns an integer which indicates the type of shape used to define a shape-based footprint. This type of footprint allows the user to draw a shape such as a rectangle or polygon , the script uses this definition to create a footprint. The method GetDefinitionPoints is then used to retrieve the points input by the user to define the shape’s outline.
Example:
Possible shapes are:
GetDefinitionPoints()
Returns a PointsObject containing the points defining an outline for a shaped-based footprint. This method is used along with GetDefinitionType to retrieve the information needed regarding the base shape used in order to define the footprint.
Example:
GetLastError()
Returns an integer id regarding the last function call which changes the footprint. Functions which change the footprint include those creating geometry, and those altering pins. A non-zero result indicates an error occurred. Zero is returned for success.
Example:
GetLayerID(name)
Returns an integer id for the given name. If a layer with “name” is not found, then a -1 is returned. The name is not case-sensitive.
Example:
CreatePointsObject()
Creates and returns an empty PointsObject. Points can then be added to this object which in turn is passed as a parameter to certain primitive creation functions.
Example: