Drawing Label position

Drawing Label position

NachoShaw
Advisor Advisor
1,276 Views
5 Replies
Message 1 of 6

Drawing Label position

NachoShaw
Advisor
Advisor

Hi

 

Can anyone help me on how this can be set up please? i need tot change the view label position by code to change from the bottom of the drawing view to the top. I have found this- (from the API)

 

DrawingStandardStyle.SetViewLabelDefaults( ViewType As DrawingViewTypeEnum, Prefix As String, Visible As Boolean, FormattedText As String, ConstrainToBorder As Boolean, PlaceBelowView As Boolean )

 

how can i implement this to change the view? It is related to the highlighted text 'PlaceBelowView'

 

 

Thanks

 

Nigel

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
1,277 Views
5 Replies
Replies (5)
Message 2 of 6

Vladimir.Ananyev
Alumni
Alumni

ViewLabel position is controlled by DrawingViewLabel.Position property.

At any moment you may re-assign this property to another Point2d object.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 6

Anonymous
Not applicable

Did you ever find out the answer to this? I'm looking for exactly the same thing

0 Likes
Message 4 of 6

Anonymous
Not applicable

If the views are already in place you can use this

 

Sub MoveLabelUp()
    Dim oDrawDoc As DrawingDocument
    Set oDrawDoc = ThisApplication.ActiveDocument
    
    Dim oSheet As Sheet
    Set oSheet = oDrawDoc.ActiveSheet
    
    Dim oViews As DrawingViews
    Set oViews = oSheet.DrawingViews
    
    Dim oView As DrawingView
    
    For Each oView In oViews
        Dim oLabelPt As Point2d
        Set oLabelPt = oView.Label.Position
        Set oLabelPt = ThisApplication.TransientGeometry.CreatePoint2d(oLabelPt.X, oLabelPt.Y + oView.Height + 1 * 2.54)
        oView.Label.Position = oLabelPt
    Next
End Sub
0 Likes
Message 5 of 6

JH81
Enthusiast
Enthusiast

Hi,

 

is it possible to change where the view labels positioned in a template? Mine comes in at the top but i would like it at the bottom on all new drawings which would save considerable time. 

 

Cheers 

0 Likes
Message 6 of 6

Anonymous
Not applicable

The view label position is controlled by the active style.

Open the template file, go to the manage tab of the menu ribbon, click on styles, in the style and standard editor upper left panel expand the active standard, click on the active standard, on the view preferences tab, click on the below radio button.

 

 

0 Likes