When I use my custom nodes (external dll - works properly in 1.3 without issues) in Dynamo 2.0, save the dyn file and reopen it the ports seem to duplicate every time?
Did someone else have this problem, too?
Any idea what could be wrong or different in 2.0?
The code is pretty standard and looks like this:
[IsDesignScriptCompatible]
[NodeName(“Stream”)]
[NodeDescription(“Stream node.”)]
[NodeCategory(“XXX.Streams”)]
[InPortNames(“Ss”,“I”,“N”)]
[InPortTypes(“Stream [List]”,“String [Item]”,“String [Item]”)]
[InPortDescriptions(“Streams [List]”,“Stream ID [Item]”,“Stream Name [Item]”)]
[OutPortNames(“S”,“Ls”,“Os”,“Ds”)]
[OutPortTypes(“Stream [Item]”, “Layer [List]”, “Object [List]”,“Dictionary [List]”)]
[OutPortDescriptions(“Stream [Item]”, “Layers [List]”, “Objects [List]”,“Dictionaries [List]”)]
public class Stream_Node : NodeModel
{
public Stream_Node()
{
RegisterAllPorts();
}
public override IEnumerable<AssociativeNode> BuildOutputAst(List<AssociativeNode> inputAstNodes)
{
var functionCall = AstFactory.BuildFunctionCall(
new Func<Stream, List<Layer>>(Receive),
new List<AssociativeNode>() { inputAstNodes[0] });
return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), functionCall) };
}
}
Best, Eckart