Showing posts with label drawing. Show all posts
Showing posts with label drawing. Show all posts

Friday, 21 October 2016

Drawing layers

                Do you use layers in Inventor drawings? Or do you consider them legacy, obsolete, pre cretaceous kind of animal?

Add caption

Last week we looked at showing hidden lines for buried components and now we look at a different method for doing that but with the additional benefits.

                When detailing pipe routes you can use the “Include Route Centerlines” command but if that view is a detail, section, cropped view you end up with a lot of extra lines. You can use this method to clean them up as well.
Include Route Centerlines, adds more than visible.
               

                Another good example is the worm gear bellow. I have an M10 hole on center and I can’t really show it properly. Top left to bottom right I have hidden lines view, normal view, hidden break out view, normal breakout view and yet not of them looks good enough.

Top left - Hidden Lines, Top Right - Normal,
Bottom Left - Hidden Break Out, Bottom Right - Normal Break Out

                What I tend to do is turn the hidden lines on for that view then edit the layers, where I turn off every one of them except Hidden and Hidden Narrow and save the style. Now I only have left the hidden lines which makes it so much easier to delete the extra stuff.
               
Turn layers off to help your selection.

                TIP: On the edit layers dialog window you can SHIFT select them all and when you click the light bulb the visibility changes to all at once.

                TIP: It’s much easier to do a window selection and select all and then hold down CTRL and deselect the view, and other curves that you need keeping. You can then use the Visibility on the right click menu to turn them off at once.

                And there you have it. Hope you’ll put this to good use and give layers a chance ; they are not used just for AutoCAD exports only.

Later
ADS


                
photo credit: Eugen Naiman layers (license)

Thursday, 13 October 2016

Drawing Hidden Lines

In the drawing have you ever needed to show components buried down below?



I didn’t have a lot of time this week for blogging but I forced myself to wake up early today and write a couple of words on this trick I use quite a lot. Will try and keep it simple for now and will do a follow-up next week on layers and how to leverage them to your advantage.

                A lot of the times I find myself in need to indicate components that are not visible unless you change the view to hidden lines. That can be daunting for untrained eye to look at and it will clutter the drawing so I tend to avoid it if I can.
               
For example take a look at the vessel in the image bellow. Turning the view to hidden lines would have made a mess out of it with no way to identify what’s what. Showing just the legs in hidden lines makes a huge difference.

Hidden lines accentuate design.
To show a component you need to find it in the browser, right click, and choose "Hidden Lines".

Enabling hidden lines

As soon as you set hidden lines on you get a message saying "Dependent vies styles will become independent”.

Changing the view message

Sometimes the “Hidden Lines” menu will be grayed out and that is because your view has linked design view representation. For that you need to edit your view and tick the “Associative” box off as bellow.

Associative off on view properties

A new option is needed here besides “show hidden lines” and that should be simply “show” which will turn the model visible (in dotted lines because it is underneath in the background) without its internal geometry. I need to indicate the component in outline, not the whole geometry but that’s for a latter post.

Next new feature?
   
Take a look at the drawing below. The drain header is visible and I only need the outline body; normally we show all runs in hidden lines but this is just a sales proposal and I couldn't be bothered. This shows just enough info, eliminating clutter and accentuating design.

Way better, isn't it?

Later,
ADS


photo credit: Max Garçia Metallica (license)

Friday, 15 July 2016

Item Number on Drawing Views (multiple Parts Lists)

                If you remember, a while back I have created an ilogic code to add item number on drawing views (original post). Some companies like to detail parts along with assembles on same drawing or even on same sheet.

                I was doing a drawing for a frame and because there were mostly standard shapes that this frame was build out of I decided to document the rest of the components on same sheet. This was not an issue for my code but on frame generator drawings I don’t use a Parts list but rather a Material List.

                The difference is that it doesn’t have an “ITEM” column and so the code would fail to work. You can manually add a Parts List on the drawing outside the sheet but the code will still not work because it looks at the first PartsList on the sheet and in this case it was my Material List.

                Don’t get confused, Parts List, Material Lists, Cut-To-Length lists are all the same, just customized to show different info.

Parts List style
                Material Lists contains, total length, stock number, Description, Material and individual items are merged to show total quantity rather than number of each item.

Cumulated lengths 
                This is setup to work with Tube and Pipe members as well. Remember that Frame Generator use G_L as length and Pipes use PL for length and if you check the column settings for Quantity you will see that if the member is pipe (PL parameter exists) then it will use it as quantity.

Works with TP pipes.

                Now that we got that out of the way and familiarized ourself with the different type of Parts Lists let’s discuss the change in code.
                The original code was looking at the first parts list
        'oPartsList = oDrawDoc.ActiveSheet.PartsLists.Item(1)

                and we need it to search for a specific one “Parts List” so the code became
        For i=1 To oPartsLists.Count
               If oPartsLists.Item(i).Title = "PARTS LIST" Then
                       oPartsList = oPartsLists.Item(i)
                       Exit For
               Else
                'do nothing
               End If
        Next
 
                Here is the full code again version 1.3 (download link here)
-------------------------------------------------------------------------------------------------------------
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
 
Dim oSheets As Sheets
oSheets = oDrawDoc.Sheets
Dim oSheet As Sheet'Inventor.Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView
Dim oPartsLists As PartsLists
Dim oPartsList As PartsList
 
For Each oSheet In oSheets
    'declare the PartsLists 
    oPartsLists = oSheet.PartsLists
 
            'try and get the parts list form the table of this sheet
            Try
                'this doesn't work when you have a material list like on frame drawings
                'oPartsList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
                'place a parts list on the drawing and search for it 
                'rather than using an id number
                
                For i=1 To oPartsLists.Count
                    If oPartsLists.Item(i).Title = "PARTS LIST" Then
                        'MessageBox.Show("found table", "ilogic")
                        oPartsList = oPartsLists.Item(i)
                        Exit For
                    Else
                        'do nothing
                    End If
                Next
                
            Catch 'on error try and search all sheets for first found parts list            
                'iterate trough each sheet
                Dim j As Long
                For j = 1 To oDrawDoc.Sheets.Count
                    If oDrawDoc.Sheets.Item(j).PartsLists.Count > 0 Then Exit For
                Next
                            
                'this doesn't work when you have other parts lists like a 
                '"material list" like on frame drawing
                'oPartList = oDrawDoc.Sheets.Item(i).PartsLists.Item(1)
                'place a parts list on the drawing and search for it 
                'rather than using an id number to locate the first
            
                For i=1 To oPartsLists.Count
                    If oPartsLists.Item(i).Title = "PARTS LIST" Then
                        'MessageBox.Show("found table", "ilogic")
                        oPartsList = oPartsLists.Item(i)
                        Exit For
                    Else
                        'do nothing
                    End If
                Next
                'MessageBox.Show("parts list found on: " & j, "Title")
            End Try
            
    oViews = oSheet.DrawingViews            
    
    For Each oView In oViews
    
        'Get the full filename Of the view model
        Dim oModelFileName As String
        oModelFileName = oView.ReferencedDocumentDescriptor.ReferencedDocument.FullFileName
        'MessageBox.Show("view model name" & oModelFileName, "Title")
                
            ' Iterate through the contents of the parts list.
            Dim j As Long
            For j = 1 To oPartsList.PartsListRows.Count
                ' Get the current row.
                Dim oRow As PartsListRow
                oRow = oPartsList.PartsListRows.Item(j)
                'get filename of model in row
                Dim oRowFileName As String
                Try ' try and get the full file name of the PL item
                    oRowFileName = oRow.ReferencedFiles.Item(1).FullFileName
                Catch 'on error go to next item
'                    Dim oCellValue As String
'                    oCellValue = oRow.Item("Item").Value
'                    MessageBox.Show("Error Processing item: " & oCellValue, "Title")
                    Continue For
                End Try
                'compare the filenames
                'Performs a text comparison, based on a case-insensitive text sort order
                'If strings equal returns 0
                If StrComp(oModelFileName, oRowFileName, CompareMethod.Text)=0 Then 
                    'Get the value of Item from the Parts List
                    'Row name needs to be case sensitive or use 1 for first 2 for second etc.
                    oCell  = oPartsList.PartsListRows.Item(j).Item("Item") 
'Row name needs to be case sensitive or use 1 for first 2 for second etc.
                    'get the value of text in cell
                    Dim oItemValue As String
                    oItemValue = oCell.Value
                    
                    'Show the view label
                    oView.ShowLabel = True
                    'format the text first line
                    oStringItem = "<StyleOverride Underline='True' FontSize='0.35'> ITEM " & oItemValue & " </StyleOverride>"
                    'format the text second line
                    oStringScale = "<Br/><StyleOverride FontSize='0.3'>(Scale <DrawingViewScale/>)</StyleOverride>"
                    
                    'add to the view label
                    oView.Label.FormattedText =  oStringItem & oStringScale
                End If  
            Next
      Next
Next

------------------------------------------------------------------------------------------------------------
EDIT: 11/08/16
if you would rather be prompted to select views rather than processing all of them , here is the code.
------------------------------------------------------------------------------------------------------------

' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
 
Dim oSheets As Sheets
oSheets = oDrawDoc.Sheets
Dim oSheet As Sheet'Inventor.Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView
Dim oPartsLists As PartsLists
Dim oPartsList As PartsList
 
For Each oSheet In oSheets
    'declare the PartsLists 
    oPartsLists = oSheet.PartsLists
 
            'try and get the parts list form the table of this sheet
            Try
                'this doesn't work when you have a material list like on frame drawings
                'oPartsList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
                'place a parts list on the drawing and search for it 
                'rather than using an id number
                
                For i=1 To oPartsLists.Count
                    If oPartsLists.Item(i).Title = "PARTS LIST" Then
                        'MessageBox.Show("found table", "ilogic")
                        oPartsList = oPartsLists.Item(i)
                        Exit For
                    Else
                        'do nothing
                    End If
                Next
                
            Catch 'on error try and search all sheets for first found parts list            
                'iterate trough each sheet
                Dim j As Long
                For j = 1 To oDrawDoc.Sheets.Count
                    If oDrawDoc.Sheets.Item(j).PartsLists.Count > 0 Then Exit For
                Next
                            
                'this doesn't work when you have other parts lists like a 
                '"material list" like on frame drawing
                'oPartList = oDrawDoc.Sheets.Item(i).PartsLists.Item(1)
                'place a parts list on the drawing and search for it 
                'rather than using an id number to locate the first
            
                For i=1 To oPartsLists.Count
                    If oPartsLists.Item(i).Title = "PARTS LIST" Then
                        'MessageBox.Show("found table", "ilogic")
                        oPartsList = oPartsLists.Item(i)
                        Exit For
                    Else
                        'do nothing
                    End If
                Next
                'MessageBox.Show("parts list found on: " & j, "Title")
            End Try
            
    oViews = oSheet.DrawingViews            

        'get view from user
        While True
            oView = ThisApplication.CommandManager.Pick( _
            SelectionFilterEnum.kDrawingViewFilter, "Select a View") 
        
            'Get the full filename Of the view model
            Dim oModelFileName As String
            oModelFileName = oView.ReferencedDocumentDescriptor.ReferencedDocument.FullFileName
            'MessageBox.Show("view model name" & oModelFileName, "Title")
                
            ' Iterate through the contents of the parts list.
            Dim j As Long
            For j = 1 To oPartsList.PartsListRows.Count
                ' Get the current row.
                Dim oRow As PartsListRow
                oRow = oPartsList.PartsListRows.Item(j)
                'get filename of model in row
                Dim oRowFileName As String
                Try ' try and get the full file name of the PL item
                    oRowFileName = oRow.ReferencedFiles.Item(1).FullFileName
                Catch 'on error go to next item
'                    Dim oCellValue As String
'                    oCellValue = oRow.Item("Item").Value
'                    MessageBox.Show("Error Processing item: " & oCellValue, "Title")
                    Continue For
                End Try
                'compare the filenames
                'Performs a text comparison, based on a case-insensitive text sort order
                'If strings equal returns 0
                If StrComp(oModelFileName, oRowFileName, CompareMethod.Text)=0 Then 
                    'Get the value of Item from the Parts List
                    'Row name needs to be case sensitive or use 1 for first 2 for second etc.
                    oCell  = oPartsList.PartsListRows.Item(j).Item("Item") 
                'Row name needs to be case sensitive or use 1 for first 2 for second etc.
                    'get the value of text in cell
                    Dim oItemValue As String
                    oItemValue = oCell.Value
                    
                    'Show the view label
                    oView.ShowLabel = True
                    'format the text first line
                    oStringItem = "<StyleOverride Underline='True' FontSize='0.35'> ITEM " & oItemValue & " </StyleOverride>"
                    'format the text second line
                    oStringScale = "<Br/><StyleOverride FontSize='0.3'>(Scale <DrawingViewScale/>)</StyleOverride>"
                    
                    'add to the view label
                    oView.Label.FormattedText =  oStringItem & oStringScale
                End If  
            Next
      End While
Next
------------------------------------------------------------------------------------------------------------
Later,
ADS
               

                

Tuesday, 23 February 2016

Revision Table

In this post I will share what is the best method to increase the revision number on the drawing. While this can be done in several ways there are a couple of things to consider, like choosing the scope of the revision and the revision table type (single/multiple entries).



First let’s identify the different types of revisions. When you place a revision table on a drawing you will be asked if the scope of the table will be Entire Drawing or Active Sheet.

Revision Scope
If you choose Entire Drawing then all sheets will have same revision number linked to the drawing iproperties.

TIP: In the Revision Table placing window make sure that “Update Property on Revision Number Edit” is ticked.

Choosing Active Sheet will mean that each sheet will have individual revision number controlled from the sheet properties.

Sheet Revision
You might ask yourself why would one need to control revision for each sheet? It’s all to do with internal specification, document controlling and validation. Some clients have one drawing number for all sheets and some have a separate drawing number for each sheet. Think of them as separate documents each with its own part number and revision/issue number. In some industries each document needs to be tracked, linked and controlled.

TIP: Remember to change your titleblock to indicate sheet revision rather than drawing revision.

 
Titleblock Revision info
Multiple entries Revision Table:

If the company standard is to show all or predefined number of entries in the revision table (like showing last 5 changes) then know this:

                The correct way to change revision is by choosing Add Revision Row on the contextual menu when you right click the revision table but you can also do this while editing the revision table. This will update revision on the sheet or iproperties as well which in fact will update the titleblock.

Correct way to add revision
                Do not choose add row because that will not update drawing/sheet properties or the title block. The number/letter you add with the add row will not be considered as a revision number and next time you choose Add Revision Row the numbering will increment but it will ignore your manually added row value.

                Do not change iproperties manually because, even though it will update title block, this will mess up the revision table. Changing the revision number in iproperties will not increase by adding new row and it’s same as if you edit the table and change the number manually.

Single entry Revision table:

If you company standard is to show only the current row in the revision table then changing iproperties might be your preferred choice. Entering a value in iproperties will override the last row in the table and will update the title block.

TIP: Remember that you can open iproperties from the revision table but even faster you can bring them up by right clicking the drawing name in the tabs or in the browser like this:
               
Getting the iProperties window.

                Either way you choose to use this I hope I gave you some good info to speed up your workflow.

Later,
ADS




photo credit: Woolpit Steam (license)

Thursday, 18 February 2016

One LOD To Rule Them All

NEVER use more than on LOD (Level of Detail) in the drawing, especially for large assemblies.


I see this problem ALL THE TIME, new or experienced users so, even if it’s not a proper blog I need to get this out… you all need to know, understand and remember this.

LOD is a memory tool not to be used in the drawings. Each LOD will load in to memory all the parts as if they were new parts even if they are just occurrences (duplicates).

Say you have an assembly of 1000 parts and you create a LOD where you suppress 1 element. If you use these two LOD’s on separate views in the same drawing then the number of occurrences will be 1000 + 999 = 1999 instead of 1000. Inventor treats each LOD as a separate assembly in the drawing!!!!



You will see a huge increase in size and you will impact performance severely.

Use Design View Representations to document different views and if you need to use LOD then have one per drawing (all sheets) like “All Content Center Suppressed” and differentiate the changes with Design View Representations.

                Now you can filter Parts List for “Design View Representation” and document a specific configuration on each Parts List but the Quantity will come from the full assembly (2017 has a fix on this).

                For now, to fix the quantity you need to look at iAssemblies. My notes on this here.

                Take a look at Large Assembly Instructions.pdf.

                You might want to suppress some of the views and turn them on when you need to work on them.

Now, repeat after me: “I swear to use only one LOD for each drawing, cross my hart and hope Inventor crashes if not”.


Later,

ADS



photo credit: Vanishing Point (license)

Friday, 27 November 2015

Improving Drawing Appearance

                One thing you have to admit: Inventor drawings can look pretty dull compared with AutoCAD and other packages. Even if you don’t customize your templates and you use the default ones that come with AutoCAD you will get pretty decent looking, good contrasting, and visual appealing drawings.
Choosing the right color for your layers is a difficult task
                Habit and taking things for granted had stopped me from customizing Inventor templates but I am in the process of changing this and improve the aspect of my drawings. When I was editing “Mastering Inventor 2016” there were a couple of files there created by my predecessors with different colors and layers and they looked really good. Slapped the back of my head for not trying it earlier and made a note to start this as soon as.

                There are some things I need to mention before asking you to try this out.

You need to think about what happens to your drawings once finished! Do you export them to PDF, DXF, or DWG? Then you might want to check how they will look with all the changed layers. Some colors will look good on the white/yellow Inventor background but will not be visible on the black background of AutoCAD. While you can print in black and force exports to all black, I would still test this out and discuss it with your colleagues to see if they can remember to tick this option every time or you need to customize their settings and implement some procedures.


Print all colors as black.
Save pdf: all colors as black
You will have to avoid some colors, and no matter how much you like them, some colors you can’t use! I am talking about Cyan, Magenta and Red and that’s because they are used already and they will clutter your drawing making it hard to edit.

Cyan is used to show unattached, orphaned end points, center points, centerlines, etc. kind of stuff and you want it to stick out so you can delete them or drag them to a new attachment location.

Magenta is used to show orphaned dimensions and annotations and you want them sticking out as well and just like above you will want to delete them or attach them to a new location.

                Red is used to pre-highlight geometry like when you hover your mouse over various geometry and elements of the drawing. You will also like to spare this color so that any drawing markup (usually in red) is visible and stands out the drawing, be that printed, pdf, dwf or just plain images.
Some colors you should not use
                Sky’s the limit, go creative and use your wild imagination but test it out for a couple of days. I would not use very bright or high contrasting colors because they tend to wear you down and make you eyes tired.

                With the drawing open click on Styles Editor on the Manage tab and head over to layers to change the display. If you can’t decide open an AutoCAD template like ISO or ANSI and use those colors as a starting point.
Style Manager dialog.

                I only have one recommendation and that is to use grey (any shade) for Hidden and Hidden Narrow layers. It will make it look like wireframe in model making the visible edges stand out.
Use grey for Hidden edges (click on the image to enlarge).
                Hope you fight your habits hard; it’s the only way forward.

                Later,
                ADS




photo credit: photo (license)