Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

View Label Appearance Customisation

4 REPLIES 4
Reply
Message 1 of 5
shmartin89
428 Views, 4 Replies

View Label Appearance Customisation

Hi guys,

 

Question regarding view labels in drawings.

 

I want to change the appearance of the view label to look like attached snap shot. Is this possible? I have looked through the inventor settings but cant find any options.
As a possbile solution I can always create intellegant symbols which update with the drawing (like the standard view labels) but before I begin creating these I wanted to check if there was any other way??

 

Cheers,

SandyCapture.JPG

4 REPLIES 4
Message 2 of 5
jtylerbc
in reply to: shmartin89

No, I don't think there is a way to do that other than symbols.  There is an idea submission requesting something very similar though.

 

http://forums.autodesk.com/t5/Inventor-IdeaStation/Customised-View-Labels/idi-p/4301201

 

You might check that out and vote / comment on it if it seems similar enough to what you're looking for.

Message 3 of 5
shmartin89
in reply to: jtylerbc

Ok, Cheers jtylerbc,

 

I was expecting to see that as a reply!

 

Next question....Do you know of any good threads where I can get code for symbols etc.? Iv used ilogic in conjunction with pararmeters etc before but i dont have the experience to be able to write anything!

 

Any help would be greatly appreciated. I guess what i need to achieve is

 

-Code to insert a specific symbol when a base/projected/auxiliary view is created.

-Code to link the Name & Scale of the View to the Symbol Text

 

Cheers,

 

Sandy

 

Message 4 of 5
jtylerbc
in reply to: shmartin89

This forum is one of the better places I've seen for getting iLogic code.  However, I've never really done any iLogic coding that involved symbols either, so I can't point you to any specific threads.  The only programming I've done that related to symbols in any way is a VBA macro that deletes a particular symbol.

 

I'd recommend just doing some searches, both here and on the Inventor Customization section of the forum.  Most VBA help is in the Customization forum - iLogic gets topics posted in both locations, so you have to check both of them.

Message 5 of 5
sstyxx
in reply to: shmartin89

SyntaxEditor Code Snippet

This should get you started.  It will insert a different sketch symbol based on the type of view it is. (I have section, detail, base and projected view set up already.  Might not be a great way to get it done and this is not done yet (I want to attach each tag to its respective view.).  I have been able to piece alot of code together from people on these forums so i thought i would give a little back.  This code is taken from multiple posts from other users.
 
Dim oDoc As DrawingDocument:  oDoc = ThisDoc.Document
oModelDoc = ThisDoc.ModelDocument

Dim oSheets As Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView
Dim oSymbol As SketchedSymbol
Dim oSymbols As SketchedSymbols

ViewLetter = New String(){"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","X","W","Y","Z"}Dim ViewCount = 0

oSheets = oDoc.Sheets

Dim view_asso_draft = 10506
Dim view_auxillary = 10499
Dim view_custom = 10498
Dim view_default = 10497
Dim view_detail = 10502
Dim view_draft = 10505
Dim view_OLE = 10500
Dim view_overlay = 10507
Dim view_projected = 10504
Dim view_section = 10503
Dim view_standard = 10501

For Each oSheet In oSheets
oViews = oSheet.DrawingViews
For Each oSymbol In oSheet.SketchedSymbols
If oSymbol.Definition.Name = "TTLs" Then
oSymbol.Delete
Else If oSymbol.Definition.Name = "TTL" Then
oSymbol.Delete
Else If oSymbol.Definition.Name = "DET TTL" Then
oSymbol.Delete
Else If oSymbol.Definition.Name = "SEC TTL" Then
oSymbol.Delete
End If
Next

    For Each oView In oViews
       
           'Set label as visible
        oView.ShowLabel = False
   
        'check view types 
        If oView.ViewType = view_detail Then
            oView.Name = ViewLetter(ViewCount)
            ViewCount = ViewCount + 1

            'This places a sketched symbol
            Dim oSymDef As SketchedSymbolDefinition
            'define the sketch symbol to be inserted
            oSymDef = oDoc.SketchedSymbolDefinitions.Item("DET TTL")
    'set a string array with values for the prompted entries found in the symbol
    Dim sPromptStrings(1) As String 
    sPromptStrings(0) = oView.Name'set to view scale
    sPromptStrings(1) = oView.ScaleString 'set to view name    
    
    'set the position for the sketched symbol to be inserted 
    'and spaced off of the selected view center
    Dim oPosition As Point2d: oPosition = oView.Center
    oPosition.y = oPosition.y - (oView.Height / 1.75 + 0.6)
    'insert the sketched symbol and set the prompted entries
    oSymbol = oSheet.SketchedSymbols.Add(oSymDef, oPosition,0,1,sPromptStrings)
'------------------------------------------------------------------------------------------------------     
        
        Else If oView.ViewType = view_section Then
            oView.Name = ViewLetter(ViewCount)
            ViewCount = ViewCount + 1
  
            'This places a sketched symbol
            Dim oSymDef As SketchedSymbolDefinition
            'define the sketch symbol to be inserted
            oSymDef = oDoc.SketchedSymbolDefinitions.Item("SEC TTL")
    'set a string array with values for the prompted entries found in the symbol
    Dim sPromptStrings(1) As String 
    sPromptStrings(0) = oView.Name 'set to view name 'set to view scale
    sPromptStrings(1) = oView.ScaleString 'set to view scale    
    
    'set the position for the sketched symbol to be inserted 
    ' and spaced off of the selected view center
    Dim oPosition As Point2d: oPosition = oView.Center
    oPosition.y = oPosition.y - (oView.Height / 1.75 + 0.6)
    'insert the sketched symbol and set the prompted entries
    oSymbol = oSheet.SketchedSymbols.Add(oSymDef, oPosition,0,1,sPromptStrings)
'------------------------------------------------------------------------------------------------------     

        Else If oView.ViewType = view_standard Then
            'This places a sketched symbol
            Dim oSymDef As SketchedSymbolDefinition
            'define the sketch symbol to be inserted
            oSymDef = oDoc.SketchedSymbolDefinitions.Item("TTL")
    'set a string array with values for the prompted entries found in the symbol
    Dim sPromptStrings(1) As String 
    sPromptStrings(0) = oView.Name 'set to view name 'set to view scale
    sPromptStrings(1) = oView.ScaleString 'set to view scale    

    'set the position for the sketched symbol to be inserted 
    ' and spaced off of the selected view center
    Dim oPosition As Point2d: oPosition = oView.Center
    oPosition.y = oPosition.y - (oView.Height / 1.5 + 0.6)
    'insert the sketched symbol and set the prompted entries
    oSymbol = oSheet.SketchedSymbols.Add(oSymDef, oPosition,0,1,sPromptStrings)
'------------------------------------------------------------------------------------------------------     
    
        Else If oView.ViewType = view_projected Then
            'This places a sketched symbol
            Dim oSymDef As SketchedSymbolDefinition
            'define the sketch symbol to be inserted
            oSymDef = oDoc.SketchedSymbolDefinitions.Item("TTLs")
    'set a string array with values for the prompted entries found in the symbol
    Dim sPromptStrings(1) As String 
    sPromptStrings(0) = oView.Name 'set to view name 'set to view scale
    sPromptStrings(1) = oView.ScaleString 'set to view scale    
    
    'set the position for the sketched symbol to be inserted 
    ' and spaced off of the selected view center
    Dim oPosition As Point2d: oPosition = oView.Center
    oPosition.y = oPosition.y - (oView.Height / 1.5 + 0.6)
    'insert the sketched symbol and set the prompted entries
    oSymbol = oSheet.SketchedSymbols.Add(oSymDef, oPosition,0,1,sPromptStrings)
    End If
    Next
Next

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

Post to forums  

Autodesk Design & Make Report