Returns the view for a given view ID, if vid is None then return the current active view. :param vid: The view ID :type vid: str
(self, vid)
| 69 | return self.getApplication().GetObjectIdMap().FreeObjectById(id) |
| 70 | |
| 71 | def getView(self, vid): |
| 72 | """ |
| 73 | Returns the view for a given view ID, if vid is None then return the |
| 74 | current active view. |
| 75 | :param vid: The view ID |
| 76 | :type vid: str |
| 77 | """ |
| 78 | v = self.mapIdToObject(vid) |
| 79 | |
| 80 | if not v: |
| 81 | # Use active view is none provided. |
| 82 | v = self.getApplication().GetObjectIdMap().GetActiveObject("VIEW") |
| 83 | if not v: |
| 84 | raise Exception("no view provided: %s" % vid) |
| 85 | |
| 86 | return v |
| 87 | |
| 88 | def setActiveView(self, view): |
| 89 | """ |
no test coverage detected