I'm totally noob in anyloigic, and now I'm trying to make simple network via code; (Network with two pointNode, and path which link those) Get some problem.
When I run my model, the console show me "using initialize() method", but I already know initialize method was deprecated in lower version. (I'm using version 8.5.1)
How can i make path via code
Really need your help
Thank you.
PointNode node1 = new PointNode();
node1.setPos(0, 0, 0);
node1.setDrawMode(SHAPE_DRAW_2D3D);
node1.setFillColor(black);
node1.setOwner(this);
node1.setRadius(10);
node1.setVisible(true);
presentation.add(node1);
PointNode node2 = new PointNode();
node2.setPos(100, 0, 0);
node2.setDrawMode(SHAPE_DRAW_2D3D);
node2.setFillColor(black);
node2.setOwner(this);
node2.setRadius(10);
node2.setVisible(true);
presentation.add(node2);
Path path1 = new Path();
path1.setBidirectional(true);
path1.setDrawingType(PATH_LINE);
path1.setDrawMode(SHAPE_DRAW_2D3D);
path1.setLineColor(black);
path1.setLineWidth(10);
path1.setOwner(this);
path1.setSource(node1);
path1.setTarget(node2);
path1.setVisible(true);
path1.toPath3D();
path1.initialize();
presentation.add(path1);
Network net1 = new Network(this,"aa");
net1.setDrawMode(SHAPE_DRAW_2D3D);
net1.setVisible(true);
net1.addAll(node1, node2, path1);