Revit 2022 API_Place view Title|Lable for viewPort_How it Works?

Revit 2022 API_Place view Title|Lable for viewPort_How it Works?

ombhagwat29
Participant Participant
393 Views
0 Replies
Message 1 of 1

Revit 2022 API_Place view Title|Lable for viewPort_How it Works?

ombhagwat29
Participant
Participant

Hi All,

I am trying to position view titles/lables for viewports placed on sheet.  I want to understand how Viewport.LableOffset works clearly.

I will try to explain my problem. For explaination purpose I have two viewpots, one contains Plan and another contians Section.

I have set  "Viewport.LabelOffset = new XYZ(0,0,0)". I believe that this XYZ is relative to Viewport CropBox or? Beacuse I get different results for view title locations having set their value to same XYZ.

 

See attached:

For this (Section) viewport as mentioned .LableOffset is set to "new XYZ(0,0,0)". hence lable is placed to the bottom corner.

ombhagwat29_0-1641279408587.png

 

In below image also .LableOffset is set to "new XYZ(0,0,0)". But lable is placed somewhere else and not at the corner of viewpot box. 

ombhagwat29_1-1641279745833.png

 

Any idea why this is happening?

I also noticed that Lable/title going to the bottom corner of Uncroped box which seems to be right but lable is not taking the croped box bottom corner which i have set through API. see below. Shouldn't it take the croped viewport bottom corner? 

ombhagwat29_2-1641280081702.png

Attached what I programmed. Let me know if you find something problematic there.

1. Here i set the crop box of plan view

ombhagwat29_3-1641280505306.png

 

 

2. Here I set  ViewPort.lableOffset

ombhagwat29_4-1641280602691.png

 

Basically I want that Title/Lable always go the bottom corner of viewport when I set .LableOffset to XYZ(0,0,0)..:D

 

ps. hope my problem is clear!!!

 

Thanks in Advance!!!

Om

 

 

 

 

0 Likes
394 Views
0 Replies
Replies (0)