885 wires.sort(lambda x, y: cmp(self.Wires[x], self.Wires[y])) |
885 wires.sort(lambda x, y: cmp(self.Wires[x], self.Wires[y])) |
886 if sort_comments: |
886 if sort_comments: |
887 comments.sort(lambda x, y: cmp(x.GetId(), y.GetId())) |
887 comments.sort(lambda x, y: cmp(x.GetId(), y.GetId())) |
888 return blocks + wires + comments |
888 return blocks + wires + comments |
889 |
889 |
|
890 def GetContinuationByName(self, name): |
|
891 blocks = [] |
|
892 for block in self.Blocks.itervalues(): |
|
893 if isinstance(block, FBD_Connector) and\ |
|
894 block.GetType() == CONTINUATION and\ |
|
895 block.GetName() == name: |
|
896 blocks.append(block) |
|
897 return blocks |
|
898 |
890 def GetConnectorByName(self, name): |
899 def GetConnectorByName(self, name): |
891 for block in self.Blocks.itervalues(): |
900 for block in self.Blocks.itervalues(): |
892 if isinstance(block, FBD_Connector) and\ |
901 if isinstance(block, FBD_Connector) and\ |
893 block.GetType() == CONNECTOR and\ |
902 block.GetType() == CONNECTOR and\ |
894 block.GetName() == name: |
903 block.GetName() == name: |