Friday, 14 July 2017

Align Drawing Views

So.. What’s happening? Not much! decided to give a hand on Inventor Forum so I was quite busy there but good things emerge like this post about how to align drawing views.


In this case, the user wanted to place multiple parts on the same drawing and align them left side for visual comparison.

                When is this useful? How about progressive die sheet metal parts?

                Of course, you can place them in a common assembly constrain them and then create a view of that but that’s not what the user wanted.

                The other common technique is to create each bend as a separate unfold/refold operation and convert the model to an iPart where you document each step of the process by suppressing fold/unfolds. You can then place multiple members on each drawing and the views will be aligned (should be because they share the same model..)

                The next code will get the X position of the first view and align the rest according to it. Views on drawing are positioned by Center so you need to get the Width of the view and divide it by 2 but it’s all in the code.

                You need to take care of the vertical Y position of the view and the code will align on X


Enjoy:

Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oView As DrawingView

Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet


' Process the rule, wrapping it in a transaction so the 
' entire process can be undone with a single undo operation. 
Dim trans As Transaction 
trans = ThisApplication.TransactionManager.StartTransaction( _ 
        oDrawDoc, "Alig Views")
        
        oFirstView = oSheet.DrawingViews.Item(1)
        
        'views are processed by center so we need to get center X and substract half view
        Dim XPos As Double
        XPos = oFirstView.Position.X - (oFirstView.Width/2)
        
        Dim oPoint2D As Inventor.Point2D
        
        'view position is XPos + half of each view
        For Each oView In oSheet.DrawingViews
            oPoint2D = ThisApplication.TransientGeometry.CreatePoint2D(XPos + (oView.Width/2),oView.Position.Y)
            oView.Position = oPoint2D
        Next
        
'finish the transaction
trans.End 

Later,

ADS.


photo credit: Simon & His Camera Reflected Wings On A Steel Butterfly - London City Office Life 2017 Version (license)

Thursday, 29 June 2017

Tube and Pipe Improvement List

IT IS DONE.


Ideas for Inventor


I have finally managed to publish all Tube and Pipe posts on Inventor Idea Station. I’ve split the original idea and documented another 65 or so.

A couple of remarks:

Idea 21 is has been posted before as an Individual item and it can be found here:

Idea 30 is work in progress. I can't replicate it and that might mean it was a temporary glitch or localized issue. If it can't be replicated then there's nothing to fix. 

Idea 84 is work in progress as well. Just before hitting the post button, a possible solution came to mind on how this might work, and if there is a workaround then it might not be an issue to be reported after all.

You can easily find all the ideas by searching for author "salariua" by category "Tube&Pipe" or by tags "overhaul, pipe, routed, systems, tube". Unfortunatelly not all of them have tags because there is a limit of 100 tags per hour and I had to drop some to keep posting.

This list was long in planning, started 2 years ago, and while these have been documented for months I had force myself and make the effort of publishing them because Autodesk was catching up and a few of them have been implemented in recent versions based on the Original Idea.

I know allot of you will blindly vote for them because you trust me, you are familiar with my work, or simply because you feel TP needs a massive consolidated effort to bring it up to date and the more ideas the better. I urge you to vote for the ones you care about and to study them carefully. While some are specific to my workflow, others will no doubt help you as well but they will be implemented by ranking number of votes.

I have to thank DRoam on Inventor Forum for grabbing the links and making one big list with active links. Please report back if the links are not working.

All in one, this is it. Thank you for your help on making Inventor a better product. Go and vote for the ones you feel need implementing.

Original idea: Tube and Pipe Overhaul
Tube&Pipe 001: “Place fittings without needing to populate first”
Tube&Pipe 002: “Glyph size setting”
Tube&Pipe 003: “batch delete work features”
Tube&Pipe 004: “Nodes break routes”
Tube&Pipe 005: “Place fitting options”
Tube&Pipe 006: “Keyboard shortcuts”
Tube&Pipe 007: “Work features visibility auto-off”
Tube&Pipe 008: “Branches”
Tube&Pipe 009: “Constrain Runs/Routes”
Tube&Pipe 010: “Remember last used size”
Tube&Pipe 011: “Multiple T&P assemblies”
Tube&Pipe 012: “Allow “violation mode” editing
Tube&Pipe 013: “Dynamic change size”
Tube&Pipe 014: “Positive/negative dimensions”
Tube&Pipe 015: “Return to parent not working”
Tube&Pipe 016: “Multi-selection working commands”
Tube&Pipe 017: “CC pipes & section views”
Tube&Pipe 018: “iProperties for CC items”
Tube&Pipe 019: “Include route centerlines for visible only”
Tube&Pipe 020: “Maintain manually changed sizes”
Tube&Pipe 021: “Multiple selections change sizes”
Tube&Pipe 022: “Speed up place from CC process”
Tube&Pipe 023: “Dimension with parameters”
Tube&Pipe 024: “Constraints for nodes”
Tube&Pipe 025: “Orientation of drawing dimension”
Tube&Pipe 026: “Isometric chain dimensions”
Tube&Pipe 027: “Changing annotation plane not working”
Tube&Pipe 028: “Saved without asking”
Tube&Pipe 029: “Filepath length”
Tube&Pipe 030: N/A
Tube&Pipe 031: “3D Ortho tool for 3D sketches”
Tube&Pipe 032: “Change Fitting Diameter inactive”
Tube&Pipe 033: “Delete not working”
Tube&Pipe 034: “Repeat Last Command missing”
Tube&Pipe 035: “Prevent fittings from changing orientation”
Tube&Pipe 036: “Default focus for commands”
Tube&Pipe 037: “Populate self-intersecting routes”
Tube&Pipe 038: “Change Fitting Diameter restores default fitting”
Tube&Pipe 039: “Match Properties function”
Tube&Pipe 040: “Orientation changes without notice”
Tube&Pipe 041: “Jumping pointer”
Tube&Pipe 042: “Change size screen refresh”
Tube&Pipe 043: “Auto constraint/dimension”
Tube&Pipe 044: “Auto-dimension for angles”
Tube&Pipe 045: “Automatic perpendicular constraint”
Tube&Pipe 046: “Routing from 3D points”
Tube&Pipe 047: “Constrain to 3D points”
Tube&Pipe 048: “Equal constraint”
Tube&Pipe 049: “Authoring iLogic iParts iAssemblies”
Tube&Pipe 050: “Move fittings with equipment”
Tube&Pipe 051: “Fittings report wrong angle”
Tube&Pipe 052: “Route construction line visibility”
Tube&Pipe 053: “Route construction line drawing visibility”
Tube&Pipe 054: “Vault Check-Out ”
Tube&Pipe 055: “Author Assemblies as TP fittings”
Tube&Pipe 056: “TP dynamic Construction Lines”
Tube&Pipe 057: “TP Construction Lines anywhere”
Tube&Pipe 058: “TP iParts iAssemblies, Shrinkwraps”
Tube&Pipe 059: “Retrieve TP dimensions in drawings”
Tube&Pipe 060: “TP Tubing with Bends Missing Constraints”
Tube&Pipe 061: “TP CC Library Rebuild”
Tube&Pipe 062: “TP Reuse Fitting Sets”
Tube&Pipe 063: “TP Dimension Error”
Tube&Pipe 064: “TP Delete Coincident Constraint on Node”
Tube&Pipe 065: “TP Fittings Not Moving”
Tube&Pipe 066: “TP Allow Rotate For All”
Tube&Pipe 067: “TP Hose Template not Honored”
Tube&Pipe 068: “TP Hose Fully Constrained Sketches”
Tube&Pipe 069: “TP Allow Import of Styles with Errors”
Tube&Pipe 070: “TP Move/Restructure Browser Fittings”
Tube&Pipe 071: “TP Hose Route Off by Default”
Tube&Pipe 072: “TP Allow Insert Fittings for All”
Tube&Pipe 073: “TP Stop Checking Out Fitings”
Tube&Pipe 074: “TP Rotating Fittings”
Tube&Pipe 075: “TP Place All Fittings”
Tube&Pipe 076: “TP Mirror Runs”
Tube&Pipe 077: “TP Clone, Copy, Rename”
Tube&Pipe 078: “TP Minimum Pipe Segment Violation”
Tube&Pipe 079: “TP Remove Pipes from Recent Open Documents”
Tube&Pipe 080: “TP Express Mode”
Tube&Pipe 081: “TP Bends Have Static Values”
Tube&Pipe 082: “TP Dimension on Browser Planes”
Tube&Pipe 083: “TP Min/Max on Inserting Nodes”
Tube&Pipe 084: N/A
Tube&Pipe 085: “TP Route Constraints Productivity Improvement”
Tube&Pipe 086: “TP Split Command off Center ”
Tube&Pipe 087: “TP Save Dialog Pop-up”
Tube&Pipe 088: “TP Save Dialog Pop-up”
Tube&Pipe 089: “TP Paste in Browser”
Tube&Pipe 090: “TP Route – Allow Angle Dimensions”
Tube&Pipe 091: “TP Show Constraints”
Tube&Pipe 092: “TP Drawing Dimension Error Tubing with Bends”
Tube&Pipe 093: “TP LOD Replace Fitting Error”
Tube&Pipe 094: “TP Dimensions Fail to Compute”
Tube&Pipe 095: “Remove ISOGEN info”
Tube&Pipe 096: “Loosing Authoring Info”
Tube&Pipe 097: “Improve Favorites Menu”
Tube&Pipe 098: “Constrain Against Sketch Route”
Tube&Pipe 099: “Connect Fitting to have Edit Orientation dialog”
Tube&Pipe 100: “Favorites cancels to Content Center”
Tube&Pipe 101: “Style Editor, replace multiple styles”
Tube&Pipe 102: “Allow Self draining, Multiple Angles”
Tube&Pipe 103: “Make Adaptive in User Folder ”
Tube&Pipe 104: “Make Adaptive Multiple Runs/Routes”
Tube&Pipe 105: “Edit Connection needs an Apply Button”
Tube&Pipe 106: “Allow us to remove Route Ghost Features”
Tube&Pipe 107: “Spaghetti Loops when Connect Fitting”
Tube&Pipe 108: “Allow Hoses to Start Both Ends”
Tube&Pipe 109: “3D Move Rotate Distorts Route”
Tube&Pipe 110: “Make Adaptive Suppresses Constraints”
Tube&Pipe 111: “Allow Publish to All CC categories”
Tube&Pipe 112: “Hide References Missing Option”
Tube&Pipe 113: “Fix Icon for Hidden Fittings”
Tube&Pipe 114: “Allow Routes to Continue From Other Routes”
Tube&Pipe 115: “Allow Include Centerline for Multiple Routes/Runs”
Tube&Pipe 116: “Cannot Use Different Lightning Environment”
Tube&Pipe 117: “Remove Fittings From Nodes”
Tube&Pipe 118: “Bend Radius Missing Error”
Tube&Pipe 119: “Defer Update Not Working in TP”
Tube&Pipe 120: “Place Parts and Fittings in Last Save Design View  Rep”
Tube&Pipe 121: “Change Fitting Orientation Random Not Working”
Tube&Pipe 122: “Smart Coincident Constraint”
Tube&Pipe 123: “Lock Fitting Orientation”
Tube&Pipe 124: “Allow Any Angle Elbow Routes”
Tube&Pipe 125: “Fix: Replace Family Template in CC”

Later,
ADS


Friday, 16 June 2017

Turn Routes On/Off

                It has finally caught up with me and I had to stop and write a code to turn Routes On/Off.



                Nothing fancy here but I found myself doing this so many times on this last project that I decided to make an iLogic external rule for it.

                This is very simple; just a few lines to check if the occurrence name starts with "Route" then turn the part off.


------------------------------------
Dim oAssyDoc As AssemblyDocument
oAssyDoc = ThisApplication.ActiveDocument

Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = oAssyDoc.ComponentDefinition

Dim oLeafOccs as ComponentOccurrencesEnumerator
oLeafOccs = oAsmCompDef.Occurrences.AllLeafOccurrences

Dim oOcc as ComponentOccurrence

'get user input as True or False
wfBoolean = InputRadioBox("Turn Routes On/Off", "On", "Off", False, "iLogic")

' Process the rule, wrapping it in a transaction so the
' entire process can be undone with a single undo operation.
Dim trans As Transaction
trans = ThisApplication.TransactionManager.StartTransaction( _
        oAssyDoc, "Routes On/Off")

    For Each oOcc In oLeafOccs
        If String.Compare(Left(oOcc.Name,5),"Route",False) = 0 Then
            'MessageBox.Show(oOcc.Name,"ilogic")
            oOcc.Visible = wfBoolean
        Else If String.Compare(Left(oOcc.Name,4),"Hose",False) = 0 Then
            oOcc.Visible = wfBoolean
        End If
    Next
'end transaction for single undo
trans.End

'upate the files
InventorVb.DocumentUpdate()
------------------------------------

Later,

ADS

Monday, 22 May 2017

CadShip

Not much is going on here at the moment in regards to blogging because I am over my head with work and various other bits that need attention.

However, I did stop by to share a link and give you something to read while I try to get on top of things.

As it happens Markus has contacted me just like most of you in regards to Inventor Tube and Pipe and couple of months later he has decided to follow my advice and share his wisdom and findings on all things, CAD.

He has just finished his first 3 parts post on CADSHIP and I urge you to take a look as I found it quite interesting.  Some will find the benefits and will probably investigate this further or just follow along with him on this but his first post is all about VR / AR, in particular about:


If you are native German speaking then you’ll fit right in, for the rest of us there’s a Translate button top right.

He is now working his way to an AR app... which no doubt will end up on his blog.

Later,
ADS


Thursday, 6 April 2017

Break all cross-part sketch projections

Short and sweet: How to Break Link on cross-part projections for all occurrences in an assembly.




I have mine disabled and I don't create cross-part references. that will slow inventor to a halt, especially on large assemblies.

When you change to Modeling View inside assembly you can select and delete more than one links at a time but only if they are part of the same sketch

Here is the ilogic code used to break adaptivity. Please run this code from an Assembly, internal or external rule

----------------------------------
Dim oAsmDoc As Document 
oAsmDoc = ThisApplication.ActiveDocument

If oAsmDoc.DocumentType <> kAssemblyDocumentObject Then
    MessageBox.Show("Run this rule from an assembly!", "iLogic")
    Return
End If

i=0

For Each oDoc As Document In oAsmDoc.AllReferencedDocuments
 Try 
  If oDoc.ModelingSettings.AdaptivelyUsedInAssembly = True Then
   oDoc.ModelingSettings.AdaptivelyUsedInAssembly = False
   i += 1
  End If
 Catch
 End Try
Next

MessageBox.Show("Turned off adaptivity for " & i & " documents!", "iLogic")
----------------------------------
Please see the screencast example here:
Thanks.
ADS


photo credit: Chatsy POP.H chain (license)