Message 1 of 6

Not applicable
11-25-2014
02:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to get the rotation of each view frame in a group. I can't find any "rotation" or "transform" properties that are exposed in the ViewFrame class. Is there any way that I can do this?
Thank you
Here is the code I am using to get information about the viewframes. I also included the test files I am using.
[CommandMethod("ListViewFrames")] public void listVFrames() { CivilDocument cdoc = CivilApplication.ActiveDocument; // Get editor for command line output Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed = doc.Editor; // Document Database Database acDB = doc.Database; ObjectIdCollection FGGIDs = cdoc.GetViewFrameGroupIds(); ed.WriteMessage("Object Class: " + FGGIDs[0].ObjectClass.DxfName + " ::: "); using (Transaction trans = acDB.TransactionManager.StartTransaction()) { ViewFrameGroup vfg = trans.GetObject(FGGIDs[0], OpenMode.ForRead) as ViewFrameGroup; ObjectIdCollection vFrameIDs = vfg.GetViewFrameIds(); ed.WriteMessage("\nFrame Count: " + vFrameIDs.Count); foreach (ObjectId vfID in vFrameIDs) { ViewFrame vf = trans.GetObject(vfID, OpenMode.ForWrite) as ViewFrame; ed.WriteMessage("\nName: " + vf.Name + " Display Name: " + vf.DisplayName); } } }
Solved! Go to Solution.