Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Duplicate" 3D view

1 REPLY 1
Reply
Message 1 of 2
phanmanhquyet
569 Views, 1 Reply

"Duplicate" 3D view

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 

1 REPLY 1
Message 2 of 2

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
Twitter @augustomaia
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community