AutoCAD Inventor :: How To Run Flat Pattern Rules From Assembly
Jun 10, 2013
rule the runs from the assembly. My assembly file has 3 sheet metal parts and what I need is use ilogic rules to export them as .dxf files at the same time. It does work when I write the code for each single part, however, the rules not works when I assembly them together. I keep getting the error message
"Error in rule: Rule3, in document: access dr_same
Unable to cast COM object of type 'Inventor._DocumentClass' to interface type 'Inventor.PartDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{29F0D463-C114-11D2-B77F-0060B0F159EF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."
Something to clear, Rule3 is the rule I wrote in ilogic to export .dxf FILE. everytime the parameter changes, the rule allows me to automatically save the surface as dxf file to a certain location. the rule works perfect in the ipt file.
however, when i assemble 3 sheet metal parts together in an assembly file, this rule not works anymore and give me the above error message.
To increase the speed of production, I like to generate idws of flat patterns from assembly. The following iLogic rule work fine inside a metal sheet (I had to create flat pattern before run this rule).
Imports Inventor.ViewOrientationTypeEnumImports Inventor.DrawingViewStyleEnumDim oDrawingDoc As DrawingDocumentDim oPartDoc As DocumentDim oSheet As sheetDim oTG As TransientGeometryDim oView1 As DrawingViewDim oOptions As NameValueMapoPartDoc [Code] ........
But from an assembly there are some problem ( firstable I'm not an expert of vba and ilogic) Imports Inventor.ViewOrientationTypeEnumImports Inventor.DrawingViewStyleEnumfmgr = ThisApplication.FilemanagerFor Each file In fmgr.filesdoc = ThisApplication.Documents.ItemByName (file.fullfileName)compdef = doc.ComponentDefinition' For each assembly or subassembly'If (doc.documenttype = 12291) Then For Each occ In compdef.Occurrences' For sheet metal or part [Code] ........
I want to create a flat pattern of a sheet metal-part that I've used in an assembly. In this assembly I've made cut-outs in some of the parts (see attached .png). Is it possible to get at flat pattern of the specific parts with the cutouts? I can e-mail a ZIP-file with the assembly (the file was too large too attach).
I created an iLogic rule that allows in a sheet metal part to the informations Length, widht and area of a flat pattern. This rule run and the iproerties are created (see attachment file).
Now, I will run this rule from an assembly file to create automatically, in all sheet metal components, theses iproperties.
Is it possible ? what must I change in this rule ?
I am trying to export geometry found in a flat pattern sketch overlaid onto the flat pattern.
Since I am creating the output file manually I gather the flat pattern boundaries and bend center lines for output to a file.
When I add flat pattern sketch entities to the mix they do not overlay properly. What matrix would I have to push the sketch entities through to get them to the same coordinates as the flat pattern?
I am very new to this whole concept of having ilogic based rules to drive your part design. I have even gotten as far as creating a ipart and having ilogic rules be able to suppress, unsuppress, change values and dimensions using ilogic rules. I now want to be able to use ilogic rules to drive some of the various(yet similiar) assemblies that I create all the time.
For instance, If I have just a flat plate as the base component with a shaft welded to it that varies in length for my assemblies. Since the shaft varies in length, I went ahead and created iparts for all the lengths of the shafts. I can manually change which shaft I want represented in the assembly, but I would like to to know how do I get Ilogic to place the different shafts based on user parameters???
I've looked into component place iparts, but can't seem to get the code to work. The list of iparts tree within the model doesn't pop up in the model tab in the ilogic rule, only the base component.
I can't find a way to create multi flat patters in one part from a lofted sheetmetal part. Also, didn't the developers fix the 'can't make a flat pattern from a derived part'?
IV 2010 Suite Digital Storm PC: EVGA & Intel components Win 7 Pro 64 bit
I have some assemblies that are made of iLogic parts. The code within the assemblies causes a common external rule to run in each of the parts to update the part's metadata (descriptions, part numbers ect.) to relect any changes to the part.
However, when a change is made to the assembly, not all the parts are effected and yet my code will still run the external rule within the uneffected parts. This slows things down some, but more problematic is the fact that the uneffected parts need to be checked out/revised, even though they themselves haven't changed.
Is there a way of reorganising my code so that external rules are only run in parts that are effected by the assembly change?
I am tying to set my sheet metal rules for parts in my assembly that have differnt materials and I would like the control to be at the assembly level. Is this posssible? I am relatively new to iLogic aand have been trying to figure this out on my own for a couple of days now.
I'm a contractor, I've created a really impressive form-driven assembly containing various iLogic rules. However, as i add more rules it is beginning to slow down (increase rule processing time). Should I suggest upgrading to 64-bit and increasing RAM?..could be costly with no increase in performance.
My next challenge with my rolled cone bottom is to place an oval in the cone that will give the right edges for the lazer pattern. If I create the cut while in the formed shape the edges are not perpendicular to the face in the flat pattern. If I place the cut in the flat pattern, it is suppressed when the part is returned to the formed state.
In other packages I would unfold the part, place the cut, and then refold it retaining the cut. How do we deal with this situation here?
I want to make dxf files from a flatpattern with ApprenticeServer in a VB6 project. I tried this code but I get a Error 5 on the line :
oDataIO.WriteDataToFile sOut, strFilenaam
What's wrong?
Public Sub Maak_UitslagDXF_Appr(strFilenaam As String) Dim oApprenticeServerApp As New ApprenticeServerComponent Dim oPartdoc As ApprenticeServerDocument Set oPartdoc = oApprenticeServerApp.Open(strFilenaam)
It's my first time using sheet metal in a drawing and I can't figure out how to show flat pattern in the drawing. When I insert the base view into my drawing, the bottom to "Sheet Metal View" to "Flat Pattern" is shown, but it's ghosted out so I can't select it. Is there something I have to do in the part drawing in order to activate this feature?
So, I have an assembly with a sheet metal part and a lot of pressed studs, spacers, weld nuts. I'd like to do a flat pattern with these parts in it in order to give their positions to manufacture, because they have to be pressed and weld in flat pattern phase, before bending.
Is there any easy way to do this (instead of saving flat pattern as SAT and insert every components again)?
I have designed a hopper using the lofted flange command. It is a 24" sq going to an 8" diameter. I would like to apply the rip feature to make (4) separate sections for this hopper so that (4) separate pieces can be cut on a waterjet machine. I can make it so that only (2) flat patterns are required, (2) pieces cut for each.
Can this be done in Inventor 2011? Also, can you recommend a good book on Sheetmetal in Inventor?
I am trying to develop a macro that exports all flat patterns for sheet metal components. I haven't been able to get the following code to work. It give the error message "The document you are trying to save is not a drawing document"
Sub PublishDXF() Dim DXFAddIn As TranslatorAddIn Set DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}") Dim oDocument As PartDocument Set oDocument = ThisApplication.ActiveDocument Dim oContext As TranslationContext [Code] .......
I just got around to installing my subscription upgrade from INV PRO 2012 to 2013. I am having trouble getting sheet metal flats to show up in the idw's. The folded parts are visible, solid parts are visible, etc. The problem seems to be specific to flat patterns. I have attached a screen shot of a sample part.
When I hover the mouse over where the flat pattern should be, the red dashed box which usually encloses the view shows up, however it is tiny. Barely the size of the view label.
I'm having difficulty with a sheet metal part creating a flat pattern for it. The shape is an ellipse with the dimensions shown in the second picture. When I attempt to create a flat pattern it just shows the side of the part. The sheet metal defaults are correct for the part and it was ripped to created a base point for the pattern. I need to create a DXF for manufacture. I would just use the flat pattern it gives me and mirror it twice to create a pattern but it doesn't factor in the radius of the part. How to create a correct flat pattern for this item?
I was wondering if there is any possible way to flat pattern a coil. Attached is a picture of what I am trying to flat pattern. Its a quarter turn of a full coil.
I want to creat a flatpattern of an iregulary cut cylinder that was made in the standard .ipt world and is now converted into a sheetmetal. I want to "Unroll" the piece out so can see the shape of it as a flat piece. Picture of it is attached.
Any way of drawing an edge bend on a flat bit of copper so I can flat pattern it for the guys on the shop floor to make.
The problem comes with the edge bend, I have provided a picture of a simple bit of copper with various flat bends and a single edge bend. As the flat pattern shows to the right the edge bend is not flattered, This was drawn using a sketch the profile then using "face" . This is why I assume it does not work in flat pattern.
Is it possible to draw an edge bend with a command to allow it to flat pattern? if so which command and how?
I attached the iLogic code which is automatically creating dwg drawing (script borrowed from one of the discussion group users), also it creates 4 views. I`m just wondering how to add flat pattern ?
I am trying to write an external iLogic rule that will export the unfolded model of a sheet metal part in a drawing from a rule triggered in the .idw. These drawings will contain only one model reference. The reason for doing this from the drawing are as follows:
1) The location of the resulting .stp file must be the same directory as the .idw file. our file structure does not co-locate these files so the drawing path is required to locate the .stp file.
2) The current Drawing Rev level is to appended to the .stp file name. We do not populate the Rev iProperty in the part.
I have scabbed together some code from verious deep dark corners on the internet and Have arrived at the code posted below, but It errors during the .stp file creation with the following:
Error Message:
Error in rule: STEP Export With Rev, in document: 4000401-02 Blank Pattern.idw Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
More Info:
System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at Inventor.FlatPattern.Edit() at LmiRuleScript.Main() at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem) at iLogic.RuleEvalContainer.ExecRuleEval(String execRule).
I can't get Inventor to create a flat pattern of the attached sheetmetal part. It's a pretty basic part, just five folds. I'm not getting any error issues - when I go to the flat pattern it just shows the folded part (picture attached).
I assume it has something to do with the way I folded it and the notches, etc. Inv makes to accomplish the fold. I'm using Inventor 2013 on Win 8.
I have a cone shaped part and would like to put a hole in the curved face. I would like have to hole square to the face in the flat pattern so it can be cut on the plasma table, is there a way to do this? I attached the part with holes in the approximate location.
Is there a feature on the latest series of inventor whereby you can automatically generate fold detail on the flat pattern , ie. fold up 45 degrees, eliminating mistakes. I am currently on Inventor 2008 so this feature could be on a new version.