ISch_Parameter interface
There are two types of parameters - system parameters which are owned by a schematic document and parameters owned by certain schematic design objects.
public interface ISch_Parameter : ISch_ComplexText
Namespace: SCH · Assembly: Altium.SDK.Interfaces
Inherits: ISch_BasicContainer → ISch_GraphicalObject → ISch_Label → ISch_ComplexText
Derived: ISch_Designator, ISch_ImageParameter
Remarks
A parameter is a child object of a Parameter Set, Part, Pin, Port, or Sheet Symbol object. A Parameter object has a Name property and Value property which can be used to store information, thus the parameters are a way of defining and associating information and could include strings that identify component manufacturer, date added to the document and also a string for the component's value (e.g. 100K for a resistor or 10PF for a capacitor).
Each parameter has a Unique Id assigned to it. This is used for those parameters that have been added as design rule directives. When transferring the design to the PCB document, any defined rule parameters will be used to generate the relevant design rules in the PCB. These generated rules will be given the same Unique Ids, allowing you to change rule constraints in either schematic or PCB and push the change across when performing a synchronization.
To look for system wide parameters (not associated with a schematic design object), you would set up an iterator to look for parameters.
Fetching system (standalone) parameters
Example
Iterate over the stand-alone parameters of the current schematic sheet.
using SCH;
ISch_Document currentSheet = SCH.GlobalVars.SchServer?.GetCurrentSchDocument();
if (currentSheet == null)
return;
ISch_Iterator iterator = currentSheet.SchIterator_Create();
// Look for stand-alone parameters only, not the parameters of components.
iterator.SetState_IterationDepth(TIterationDepth.eIterateFirstLevel);
iterator.AddFilter_ObjectSet(new SCH.TObjectSet { TObjectId.eParameter });
try
{
for (var parameter = iterator.FirstSchObject() as ISch_Parameter; parameter != null; parameter = iterator.NextSchObject() as ISch_Parameter)
{
// Do what you want with the parameter.
}
}
finally
{
currentSheet.SchIterator_Destroy(ref iterator);
}
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| AllowDatabaseSynchronize | bool | get; set | |
| AllowLibrarySynchronize | bool | get; set | |
| Description | string | get; set | |
| IsConfigurable | bool | get | |
| IsRule | bool | get | |
| IsSystemParameter | bool | get | |
| Name | string | get; set | The Name property determines the name for the parameter object. |
| NameIsReadOnly | bool | get | |
| ParamType | TParameterType | get; set | |
| ReadOnlyState | TParameter_ReadOnlyState | get; set | |
| ShowName | bool | get; set | |
| ValueIsReadOnly | bool | get | |
| VariantOption | IVariantOption | get; set |
AllowDatabaseSynchronize
No description yet.
bool GetState_AllowDatabaseSynchronize();
void SetState_AllowDatabaseSynchronize(bool argB);
Type: bool · Access: read/write
AllowLibrarySynchronize
No description yet.
bool GetState_AllowLibrarySynchronize();
void SetState_AllowLibrarySynchronize(bool argB);
Type: bool · Access: read/write
Description
No description yet.
string GetState_Description();
void SetState_Description(string argS);
Type: string · Access: read/write
IsConfigurable
No description yet.
bool GetState_IsConfigurable();
Type: bool · Access: read-only
IsRule
No description yet.
bool GetState_IsRule();
Type: bool · Access: read-only
IsSystemParameter
No description yet.
bool GetState_IsSystemParameter();
Type: bool · Access: read-only
Name
The Name property determines the name for the parameter object.
string GetState_Name();
void SetState_Name(string argS);
Type: string · Access: read/write
Examples: Ciiva
NameIsReadOnly
No description yet.
bool GetState_NameIsReadOnly();
Type: bool · Access: read-only
ParamType
No description yet.
TParameterType GetState_ParamType();
void SetState_ParamType(TParameterType argN);
Type: TParameterType · Access: read/write
The accessors are extension methods of ISch_ParameterHelper (using SCH;).
ReadOnlyState
No description yet.
TParameter_ReadOnlyState GetState_ReadOnlyState();
void SetState_ReadOnlyState(TParameter_ReadOnlyState argR);
Type: TParameter_ReadOnlyState · Access: read/write
The accessors are extension methods of ISch_ParameterHelper (using SCH;).
ShowName
No description yet.
bool GetState_ShowName();
void SetState_ShowName(bool argN);
Type: bool · Access: read/write
ValueIsReadOnly
No description yet.
bool GetState_ValueIsReadOnly();
Type: bool · Access: read-only
VariantOption
No description yet.
IVariantOption GetState_VariantOption();
void SetState_VariantOption(IVariantOption argV);
Type: IVariantOption · Access: read/write
The accessors are extension methods of ISch_ParameterHelper (using SCH;).
Inherited members
- From ISch_ComplexText: Autoposition, IsHidden, TextHorzAnchor, TextVertAnchor
- From ISch_Label: CalculatedValueString, DisplayString, FontId, Formula, IsMirrored, Justification, Orientation, OverrideDisplayString, SimpleCalculatedString
- From ISch_GraphicalObject: AddErrorString, AreaColor, BoundingRectangle, BoundingRectangle_Full, Color, CompilationMasked, Dimmed, Disabled, DisplayError, EnableDraw, ErrorColor, ErrorKind, ErrorString, GetHash, GraphicallyInvalidate, LiveHighlightValue, Location, Mirror, MoveByXY, MoveToXY, OwnerPartDisplayMode, OwnerPartId, ResetErrorFields, RotateBy90, Selection, SetState_xSizeySize
- From ISch_BasicContainer: AddAndPositionSchObject, AddSchObject, CopyTo, DeleteAll, DescriptionString, ExportToParameters, FreeAllContainedObjects, Handle, IdentifierString, Import_FromUser, ObjectId, OwnerSchDocument, RemoveSchObject, Replicate, SchBasicContainer, SchIterator_Create, SchIterator_Destroy, SchParameterByName, Setstate_Default, Text, UniqueId, WiringDiagramOriginUniqueId
Returned by
IFSM_State.SchComment, IFSM_Transition.SchComment, ISch_BasicContainer.SchParameterByName, ISch_Component.AddSchParameter, ISch_Component.SchComment, ISch_HarnessBundle.SchComment, ISch_HarnessBundle.SchLength, ISch_HarnessCable.SchComment, ISch_HarnessCable.SchDescription, ISch_HarnessLayoutLabel.SchComment, ISch_HarnessWire.SchComment, ISch_HarnessWire.SchDescription
Examples
Used in the SDK examples: Ciiva.