How to change the PlanViewRange?

How to change the PlanViewRange?

wenxi
Participant Participant
1,359 Views
4 Replies
Message 1 of 5

How to change the PlanViewRange?

wenxi
Participant
Participant

Hello

I am creating a new Floor Plan view/level. And i want to use Revit API  to change PlanViewRange's offset/viewdepth and so on.

 

i set my code in the doc.ActiveView,the code can execute and with no error,but PlanViewRange's offset/viewdepth was not changed,i want to

 

know,what's the problem with my code.

 

And i wanti to change the PlanViewRange's TopClipPlane to Unlimited,but i don't know use what class to do this,please help me.

                                                                                                                                                                                                       thank you!

                    

0 Likes
Accepted solutions (2)
1,360 Views
4 Replies
Replies (4)
Message 2 of 5

Revitalizer
Advisor
Advisor
Accepted solution

Hi,

 

I didn't use the PlanViewRange class before, so this is just a guess.

 

After getting the PlanViewRange and modifying it, you may need to re-assign it to the given ViewPlan before the Commit() statement.

 

...

vie.SetViewRange(Pv);
trans.Commit();

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 3 of 5

Revitalizer
Advisor
Advisor
Accepted solution

Hi,

 

another guess for the second issue:

 

"And i wanti to change the PlanViewRange's TopClipPlane to Unlimited,but i don't know use what class to do this,please help me."

 

Pv.SetLevelId(PlanViewPlane.TopClipPlane, PlanViewRange.Unlimited);

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 4 of 5

wenxi
Participant
Participant

thank you,you skill is very userful!

0 Likes
Message 5 of 5

wenxi
Participant
Participant

The method you tell me is wonderful!

thank you very much! 

 

0 Likes