Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I have code that has the user select a viewport. I then need to set the selected viewport to an existing view, but I cannot find any exampes of this.
A couple of things that are confusing me...
I have the viewport, but how do I get the ViewPortTable/ViewPortTableRecord from it?
Do I need to set the view in the ViewPortTableRecord od the ViewTableRecord?
No problems to this point...
'Code snip
If acPrmpt_res.Status = PromptStatus.OK Then
Dim acVPort As Viewport = Nothing
Dim acViewTbl As ViewTable
Dim acViewTblrec As ViewTableRecord
Dim acVPortTbl As ViewportTable
Dim acVPortTblRec As ViewportTableRecord
Dim acEnt As Entity = Nothing
For Each acObjId As ObjectId In acPrmpt_res.Value.GetObjectIds
acEnt = acObjId.GetObject(OpenMode.ForRead)
If TypeOf acEnt Is Viewport Then
acVPort = acObjId.GetObject(OpenMode.ForRead)
acVPort.Highlight()
'Set selected viewport named view here...
End If
Next
'Code snipAny help would be greatly appreciated!
Solved! Go to Solution.