Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Drawing Label position

5 REPLIES 5
Reply
Message 1 of 6
NachitoMax
978 Views, 5 Replies

Drawing Label position

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 Programmer (C#, VB.Net / iLogic)


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.


5 REPLIES 5
Message 2 of 6

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

Message 3 of 6
aliceloneragan
in reply to: NachitoMax

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

Message 4 of 6
rusmwb
in reply to: aliceloneragan

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
Message 5 of 6
JH81
in reply to: rusmwb

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 

Message 6 of 6
rusmwb
in reply to: JH81

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.

 

 

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

Post to forums  

Autodesk Design & Make Report