Basic Concepts
This command creates a new Break/Contunuous Symbol.
ParametersSymbol Annotation templates have knowledge parameters that are used to expose the parameters to create an annotation or to drive the template. You can create parameters under the parameters node in the following ways:
The following types of parameter can be created:
The following specific parameters that are computed from annotation instance can be used and set in the template:
RelationsAnnotation template can have knowledge relations used to drive it and add particular behavior that can editable through parameters. Relations have to be added under the Relations node:
Trigger Action
You must write the logic to get the symbol type from the input annotation, and construct the symbol ,And show or hide related type parameters based on the symbol type. To get the symbol type, a new knowledgeware method is provided on the knowledgeware feature ASDSymbolAnnotaion. The description of new knowledgeware feature symbol annotation is as follows: Types: ASDSymbolAnnotaion inherited from ASDAnnotation Method: ASDSymbolType GetSymbolType () Computes the symbol type based on an input set on the symbol annotation. Return values are ASDSymbolType of type ASDContinuousSymbol or ASDBreakSymbol. The below table describes the knowledgeware types:
Example
The sample code to build the break or continuous symbol on the symbol type returned by the SymbolAnnotation /*Sample Code to build the break or continious symbol base on the symbol type returned by the SymbolAnnotation*/
if(InputAnnotation <> NULL)
{
Let ContiniousSymbol(DrwArrow)
Let BreakSymbLeft(DrwArrow)
Let BreakSymbRight(DrwArrow)
//Break and continous symbol arrows
Set ContiniousSymbol = `Structural View Symbol\BreakOrContiniousSymbol\Arrow.1`
Set BreakSymbLeft =`Structural View Symbol\BreakOrContiniousSymbol\Arrow.2`
Set BreakSymbRight =`Structural View Symbol\BreakOrContiniousSymbol\Arrow.3`
//Initilize the arrow color to black
ContiniousSymbol.Color="BLACK"
BreakSymbLeft.Color="BLACK"
BreakSymbRight.Color="BLACK"
//Reset to default
ContiniousSymbol.Show=TRUE
BreakSymbLeft.Show = TRUE
BreakSymbRight.Show=TRUE
//Get the Symbol Type
Let SymbolType(ASDSymbolType)
SymbolType = InputAnnotation->GetSymbolType()
if(NULL <> SymbolType)
{
if(SymbolType.IsASortOf("ASDContinuousSymbol"))
{
//If symbol type is a ContinuousSymbol,
// Hide the break symbol arrow, and show only the parameter relatd to continuous Symbol,
ContiniousSymbol.Show=TRUE
BreakSymbLeft.Show = FALSE
BreakSymbRight.Show=FALSE
`Structural View Symbol\BreakOrContiniousSymbol\ASDDrwAnnotationTemplate.1\Parameters\ParallelOffset`.Show = FALSE
`Structural View Symbol\BreakOrContiniousSymbol\ASDDrwAnnotationTemplate.1\Parameters\DistanceOffset`.Show = FALSE
}
else if(SymbolType.IsASortOf("ASDBreakSymbol"))
{
//If symbol type is a ContinuousSymbol,
// Hide the continious symbol arrow, and show only the parameter relatd to break Symbol,
Let SymBreak(ASDBreakSymbol)
set SymBreak = SymbolType
//Get the crossing plate thickness with respect to sheet reference
Let PlateThicknessInSheetRef(Length)
PlateThicknessInSheetRef = SymBreak.GetCrossingPlateThicknessInSheetRef()
//Set the plate thickness to distance offset parameter, user can also add own distance offset
if(PlateThicknessInSheetRef > 0mm)
`Structural View Symbol\BreakOrContiniousSymbol\ASDDrwAnnotationTemplate.1\Parameters\DistanceOffset` = PlateThicknessInSheetRef + 1mm
ContiniousSymbol.Show=FALSE
BreakSymbLeft.Show = TRUE
BreakSymbRight.Show=TRUE
`Structural View Symbol\BreakOrContiniousSymbol\ASDDrwAnnotationTemplate.1\Parameters\ParallelOffset`.Show = TRUE
`Structural View Symbol\BreakOrContiniousSymbol\ASDDrwAnnotationTemplate.1\Parameters\DistanceOffset`.Show = TRUE
}
}
}
An optional action Update Arrow updates the arrow when you modify the template parameter on Symbol annotation instance.
Note:
The Symbol Annotation template must not contain any leader.
| ||||||||||||||||||||||||||||||||||