Autodesk Revit API
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
"Duplicate " 3D view
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
168 Views, 1 Replies
09-29-2012 06:30 PM
Im using Revit 2012, from my understand, revit api will not allow to duplicate a view. I try to walk a round by create one origin 3D view, then set the properities of new view same as origin, for instance such as: . CropBox or .SectionBox.
But i'm struggeling at how to set the view orientation exactly same as origin view. I have try but not successful. Does anyone know how to solve this?
Thanks.
Quyet
Re: "Duplicate " 3D view
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-04-2012 10:50 AM in reply to:
phanmanhquyet
Hi,
Not sure if I'm following, but the View3d object on 2012 API have two relevant methods: eyeposition and sectionbox. Below is a sample from the help file, please take a look.
>>>
private void Getinfo_View3D(View3D view3D) { string message = "View3D: "; // The position of the camera. XYZ eyePosition = view3D.EyePosition; message += "\nCamera position: (" + eyePosition.X + ", " + eyePosition.Y + ", " + eyePosition.Z + ")"; // Identifies whether this is a perspective view. if (view3D.IsPerspective) { message += "\nThe view is a perspective."; } // The section box of the 3D view cuts the model by its bounds. BoundingBoxXYZ sectionBox = view3D.SectionBox; XYZ max = sectionBox.Max; //Maximum coordinates (upper-right-front corner of the box). XYZ min = sectionBox.Min; //Minimum coordinates (lower-left-rear corner of the box). message += "\nSection Box: "; message += "\nMaximum coordinates: (" + max.X + ", " + max.Y + ", " + max.Z + ")"; message += "\nMinimum coordinates: (" + min.X + ", " + min.Y + ", " + min.Z + ")"; TaskDialog.Show("Revit",message); }
<<<
Hope this help, please let me know if it doesn't.
Regards,
Augusto Goncalves
Autodesk Developer Network
Augusto Goncalves
Autodesk Developer Network
