diff -r 1d221eda1e42 -r 26e8b99bc2c3 plcopen/structures.py --- a/plcopen/structures.py Wed Sep 04 00:06:44 2013 +0200 +++ b/plcopen/structures.py Mon Sep 09 00:48:34 2013 +0200 @@ -42,7 +42,7 @@ return mylist def generate_block(generator, block, block_infos, body, link, order=False, to_inout=False): - body_type = body.getcontent()["name"] + body_type = body.getcontent().getLocalTag() name = block.getinstanceName() type = block.gettypeName() executionOrderId = block.getexecutionOrderId() @@ -158,7 +158,7 @@ generator.Program += JoinList([(", ", ())], vars) generator.Program += [(");\n", ())] - if link: + if link is not None: connectionPoint = link.getposition()[-1] output_parameter = link.getformalParameter() else: @@ -177,7 +177,7 @@ else: for i, variable in enumerate(output_variables): blockPointx, blockPointy = variable.connectionPointOut.getrelPositionXY() - if (not connectionPoint or + if (connectionPoint is None or block.getx() + blockPointx == connectionPoint.getx() and block.gety() + blockPointy == connectionPoint.gety()): output_variable = variable