bdeCreateActivationLink
Creates an activation link between srcBlock and destBlock. Connects two blocks with ports of type activation.
Syntax
activationLink = bdeCreateActivationLink(diagram, srcBlock, srcPortNum, srcIOType, destBlock, destPortNumber, destPortIOType, points)
Inputs
- diagram
- The diagram to create a link within.
- srcBlock
- The source block that the link will be connected to.
- srcPortNum
- The number of the source port that the link will be connected to.
- srcIOType
- The IO type of the source port that the link will be connected to. Uses 'input' or 'output'.
- destBlock
- The destination block that the link will be connected to.
- destPortNumber
- The number of the destination port that the link will be connected to.
- destIOType
- The IO type of the destination port that the link will be connected to. Uses 'input' or 'output'.
- points
- Points on the diagram where the link will have intermediate points at. The link will pass through these intermediate points.
Outputs
- activationLink
- Newly created activation link.
Examples
mdl=bdeCreateNewModel('test1');
dg=bdeGetModelDiagram(mdl);
blk1=bdeCreateBlock('system/SignalGenerators/Constant');
params=struct;
params.externalActivation='1';
bdeSetBlockParametersValues(blk1,params);
bdeAddBlockToDiagram(dg,blk1,200,200);
blk2=bdeCreateBlock('system/ActivationOperations/SampleClock');
bdeAddBlockToDiagram(dg,blk2,100,100);
bdeAutoCorrectLinks(dg);
bdeCreateActivationLink(dg,blk2,1,'output',blk1,1,'input',[120,170;220,170]);
bdeRedrawDiagram(dg);