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: 

View Cropbox

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
665 Views, 6 Replies

View Cropbox

Please help me understand what is or is not possible with Views.

The program I have written moves all Elements from the current Level elevation to a new one... The need is due to Topography being set by Absolute Z coordinate. We do many Projects from a common Template. Each new Project needs to be "lifted" to the appropriate Absolute Level. This is very tedious to do in the UI, so I wrote an API program. I have managed to get all elements and annotations to move to the new Level... except for the CropBox(es) for the Elevation and Section views. These still have to be moved manually.

I have spent several hours trying to move the view origins and have failed. I have attempted to retrieve the CropBox as a BoundingBoxXYZ and manipulate it. No luck.... just retrieving it and re-assigning causes very odd behavior. It looks as is Model Z is confused with Screen Z. I don't know.

Please advise:
Is it possible to move the View CropBox in model Z after all the Levels and Elements have been moved?
Am I trying to move the appropriate object?
And of course: if it is possible, how can it be done? (VB.Net please)

Cheers, Ian.
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Why doesn't Tools> Project Position/Orientation > Relocate Project work for
you? It was desogned to do specifically what you describe... I really don't
think you need the API for this task...

wrote in message news:5719592@discussion.autodesk.com...
Please help me understand what is or is not possible with Views.

The program I have written moves all Elements from the current Level
elevation to a new one... The need is due to Topography being set by
Absolute Z coordinate. We do many Projects from a common Template. Each new
Project needs to be "lifted" to the appropriate Absolute Level. This is very
tedious to do in the UI, so I wrote an API program. I have managed to get
all elements and annotations to move to the new Level... except for the
CropBox(es) for the Elevation and Section views. These still have to be
moved manually.

I have spent several hours trying to move the view origins and have failed.
I have attempted to retrieve the CropBox as a BoundingBoxXYZ and manipulate
it. No luck.... just retrieving it and re-assigning causes very odd
behavior. It looks as is Model Z is confused with Screen Z. I don't know.

Please advise:
Is it possible to move the View CropBox in model Z after all the Levels and
Elements have been moved?
Am I trying to move the appropriate object?
And of course: if it is possible, how can it be done? (VB.Net please)

Cheers, Ian.
Message 3 of 7
Anonymous
in reply to: Anonymous

I had expected Tools> Project Position/Orientation > Relocate Project to do the job, but it moves the entire model coordinate system in Z then sets the relative levels back to zero.

The problem is that if ground floor is at 0 and we are given survey data with levels around 100m, we need to move all the levels up so that the ground floor level is now say 100500. The UI tool does not do this. Use that tool and the floor levels stay at the same relative project RL. Topography data stays anchored to absolute levels, so the only way to get the two together seems to be set the project levels to be absolute to match the topo.

The functional requirement is for the building model to be moved vertically so that the base floor level can be set to a survey absolute level. This can be done in several manual stages through the UI. My API app does most of it... except for the section and elevation cropboxes, which still need to be elevated manually.

What Tools> Project Position/Orientation > Relocate Project is intended to do is not clear. But it does not seem to satisfy this functional need... unless there is something we are missing?
Message 4 of 7
Anonymous
in reply to: Anonymous

Not quite. there are two systems in Revit. The project internal and the
shared coordinates. You only need to set your levels to read the shared
coordinates. This allows one system to reference 100' and relative
dimensions from that, while another can reference the actual levels.

wrote in message news:5720759@discussion.autodesk.com...
I had expected Tools> Project Position/Orientation > Relocate Project to do
the job, but it moves the entire model coordinate system in Z then sets the
relative levels back to zero.
Message 5 of 7
Anonymous
in reply to: Anonymous

The problem is within the internal project units and how floor levels and topography is handled. Topography seems to be locked to Absolute units. The topography is created in the same project file as the architectural model.

Do this simple excercise:
_______________________
Start Revit.
Close the default project.
File > New > Project > Template File > None > OK > Metric
Modelling > Floor > Lines > Rectangle > Sketch 10000 x 10000. Finish Sketch
Basics > Section > Sketch anywhere through the Floor. Context Menu > Go to View
Return to Floor Plan; Leave Section1 View open.
Site > Toposurface > Point > Elevation 6000... place 4 points for corners of Topo outside of Floor.
Open default 3D View. Note that Floor is 6000 below Topo.
Return to Section 1
Select Entire Selection View with Floor... Use Move to to move Section and Floor Up (Model Z / Screen Y) by 6100.
Now the Floor is on the Ground.
________________________

We are documenting project homes. One per day. The template file is extensive and very customised. All drawing sheets and views are set up. Referrence planes define where the house is to be modelled. Ground Floor level is initially set to 0.0. We are provided with survey levels that may be anywhere from 5m to 100m above 0. These points are entered to define the ground surface for the site. The house needs to be lifted to sit on that site. Using the Drafting > Spot Dimension > Spot Elevation tool is essential to provide RL points for the topogaphy and the floor slab levels for the house.

How can shared coordinates be used when the topography is based on absolute project units and the house needs to be set to that level?

Which brings me back to the question:
Can the Section and Elevation view crop boxes be moved through the API? (I have written code that moves everything else.)
Cheers, Ian
Message 6 of 7
Anonymous
in reply to: Anonymous

I've found best practice is to put the site in a separate project and link to it in the building project. I think
combined with Aaron's advice this will be significantly easier than trying to attack it with the API.

HTH,

Guy

iansp wrote:
> The problem is within the internal project units and how floor levels and topography is handled. Topography seems to be locked to Absolute units. The topography is created in the same project file as the architectural model.
>
> Do this simple excercise:
> _______________________
> Start Revit.
> Close the default project.
> File > New > Project > Template File > None > OK > Metric
> Modelling > Floor > Lines > Rectangle > Sketch 10000 x 10000. Finish Sketch
> Basics > Section > Sketch anywhere through the Floor. Context Menu > Go to View
> Return to Floor Plan; Leave Section1 View open.
> Site > Toposurface > Point > Elevation 6000... place 4 points for corners of Topo outside of Floor.
> Open default 3D View. Note that Floor is 6000 below Topo.
> Return to Section 1
> Select Entire Selection View with Floor... Use Move to to move Section and Floor Up (Model Z / Screen Y) by 6100.
> Now the Floor is on the Ground.
> ________________________
>
> We are documenting project homes. One per day. The template file is extensive and very customised. All drawing sheets and views are set up. Referrence planes define where the house is to be modelled. Ground Floor level is initially set to 0.0. We are provided with survey levels that may be anywhere from 5m to 100m above 0. These points are entered to define the ground surface for the site. The house needs to be lifted to sit on that site. Using the Drafting > Spot Dimension > Spot Elevation tool is essential to provide RL points for the topogaphy and the floor slab levels for the house.
>
> How can shared coordinates be used when the topography is based on absolute project units and the house needs to be set to that level?
>
> Which brings me back to the question:
> Can the Section and Elevation view crop boxes be moved through the API? (I have written code that moves everything else.)
> Cheers, Ian
Message 7 of 7
Anonymous
in reply to: Anonymous

Sorry Guy,
It is not viable or acceptable to have the site / topography in a separate file. We do slab on ground residential construction. The topo must be edited in concert with the floor slab and earthworks.. That cannot readily be achieved if they are in separate files.

The paradigm that we are using works very well. It is simply that there are no inclusive tools in Revit to set the template project to the required base level. It can be done completely manually. The API tool that I have written does it all very quickly... except for the View CropBoxes which fail in every property and method that I have tried. Parameters do not do the trick either (took me a while to find the text string of a TextNote is buried in the Parameters and not as a Property... but that's another API tool.)

So: conclusion is: the Elevation and Section View CropBoxes cannot be manipulated through the API?

Cheers,Ian

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

Post to forums  

Rail Community


Autodesk Design & Make Report