I am trying to use iLogic to programatically create virtual components in an assembly. These components will by used as iProperty "buckets" to hold Machine Center specific information to be exported to production planning software. This information is hierarchical in nature and cannot be (conveniently) stored in the assembly iproperties directly.
II need a way to tell if a component occurence is a virtual component.
I'm using a For Each loop to cycle through all of the components in an assembly, and if the component is itself an assembly to set the LOD to "Custom". I'm using the definition document descriptor object for this. It all woks fine until the loop comes across a virtual component which doesn't have a definition document, so I need a way to check if the component is virtual and needs to be skipped.Here's the
Option ExplicitImports Inventor.LevelOfDetailEnumSub MainiLogicVb.UpdateWhenDone = TrueDim doc As AssemblyDocumentDim oLOD As LevelOfDetailRepresentationDim oAsmCompDef As ComponentDefinitionDim oComp As ComponentOccurrenceDim oComps As ComponentOccurrencesdoc = ThisDoc.DocumentIf. [code]....
Here in some IAM mine, i need to put a % more of some parts, so I decided to use virtual components for that. It worked great, but I'm with 2 doubts to get faster doing that.
1º - Is there a way to link the properties of a virtual component, to an existing part ? Like mass, part number and some Customs too. That would be easier in this case, when I need just put some more parts without change the modeling visual.
2º - Can I use a template to create a virtual component ? I did some searches, but I just found topics from 2005 that it wasn't possible, but with IV 2013 or even 2014 is that possible ? I have here many custom properties that I always have to create again in virtual components.
I`m working on the code that reads a list of virtual parts from Excel and adds required qty into the assembly. So far it looks good, I just need to know how to create a folder in a Assembly view tree and save virtual part in that folder instead of placing it in the root.
Dim occs As ComponentOccurrences occs = asmDoc.ComponentDefinition.Occurrences Dim identity As Matrixidentity = ThisApplication.TransientGeometry.CreateMatrixDim virtOcc As ComponentOccurrencevirtOcc = occs.AddVirtual(sVirtPart, identity)
now a have a typical error to insert in my assambly a item from my content center, reciveing a erro like "unable to create component", i´m looking for a solution inside forums and find a solution but didn´t work for me, the solution watched and did for me as deleted of the content folder "CACHE" in my computer C:/....all users/inventor..../cache.
I use AI2009 with SP1.
What can i do, delete all families from content center and upload again?
Today, all of a sudden, my coworkers and I cannot place standard parts from our content center (there are only three of us). We are not using Vault - but we have set up our Content Center to access a network location:
N:StandardsInventorContent Center FilesLibraries
This has worked for months ever since we set it up. Problems just started today for all of us. Parts that DO work are parts that you have to tell it an extruded length (like structural steel or tube/pipe). Nothing else will work (fasteners, pipe fittings, shaft collars, etc).
Interestingly, if I select to insert the part "as custom" instead of "as standard", all parts work like they should.
For the parts that do not work, I can navigate through all of the menus to select parts, but instead of getting the "Save As" dialogue, I get the "Unable to create component" error message.
I found this code to create a custom iProperty in the current, open document:
Dim propertyName As String = "MyProperty"Dim propertyValue as String = "Test Value"customPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")Try prop = customPropertySet.Item(propertyName)Catch ' Assume error means not found customPropertySet.Add("", propertyName)End TryiProperties.Value("Custom", propertyName) = propertyValue
I have a iLogic rule that goes through each component of an assembly, counts how many times it occurs in the assembly, and then assigns that value to an iProparty (i.e. it inserts the total quantity of the part in some iProperty). Currently, however, it assigns the value to a default iProperty value, "Authority". I'd like, instead, for it to assign it to a custom iProperty called "Total QTY". However, I don't know how to tell Inventor to do the above code for a component in the assembly rather than the assembly itself. Below is my entire code. I've labeled where I'm guessing the above code should go. How I'd modify the above code to create the iProperty in the component being processed by the rule at that point?
Current
''True comment: Begin '''Commented-out Begin '''PartDocumentObject = 12290''AssemblyDocumentObject = 12291Dim openDoc As DocumentopenDoc = ThisDoc.DocumentDim docFile As DocumentIf openDoc.DocumentType = 12291 Then''If the open document is an assembly:''For each document referenced in this document:For [code]......
my create a circular pattern in an assembly that maintains the orientation of the part being patterned.
This is for foundation plates. There are 3 plates. The plates are square, and have bolt holes in the corners of the plates. Since there are 3 plates and its going around a circle, the angle between the plates is 120 degrees.
Now, Ive been trying this for some time now and what is happening is the firs plate is fine, but then the second and third plate are rotated around their center axis. I would like it to simply remain as inserted and constrained within the assembly.
I have attached a picture to be more clear about what I want and what I'm currently getting.
I'm in the process of creating an exploded view of an assembly. I'm having to do this in a presentation file, and I was wondering if it was possible to section one of the parts in the exploded view. To be more specific, I have the majority of my parts spread out around another assembly in the center of the page. I want to get a three quarter section view of the center assembly so the internals are visible. Is this possble from within a presentation file and if so, how can it be done?
Inventor Professional 2013 Intel Xeon W3680 @ 3.33Ghz 12GB DDR3 RAM NVIDIA Quadro 2000 GPU Windows 7 Professinal 64-bit
We are having an issue when we replace a component in Inventor Pro 2012. When we replace a component, the name in the browser does not update to the new component. We've even tried to close and re-open the Inventor assembly and that does not work. We end up manual double clicking the name in the browser and type in the new component name.
Inventor Product Design Suite Ultimate 2012 Dell Precision T7500 Workstation Xeon Processor 16 GB of RAM Nvidia Quadro FX 5800 Windows 7 x64
I am trying to make port rims for pipes that can be swapped in and out of an assembly. However, the ports will all be different sizes and located differently so I need the cut to be part of the port rim component, but affect the entire assembly it is part of. I've been trying to get this to work for the better part of a day now,Here's a picture of what im talking about. I'm running Inventor 2008 by the way.
Is it possible to auto-reattach dimensions programmatically?
I have an assembly that I'm suppressing/unsuppressing parts in and my drawing dimensions keep getting orphaned. I discovered the "Preserve Orphaned Annotations" option, which keeps them from disappearing on me. I can then reattach the dimensions via the design doctor, but who wants to click the doctor 6 times for 20+ dimensions?
In ipart there is an option to add and delete rows when working with inventor graphically.I have displayed the iPart table and the values in gridview using VB.Net.
The user then selects the row in datagridview and clicks the button delete.When the button onclick even is triggered i want to delete the selected row on ipart table inside inventor.
im trying to programatically add a parts list into a drawing whilst programatically creating the drawing - the code works fine without the parts list code. The error its showing is 'Parameter incorect' on the line that sais PartsList.add(... In the past when ive got this error with other code it has been because ive used an incorrect parameter (e.g. decimal instead of an integer).
My error is somewhere inside the oPartsList.add(>>ERROR SOMEWHERE HERE<<<)
I am trying to programatically update Units of Measure on a part or document through Document Settings, but the changes are not reflected. I cannot save the file, because the file is a result of import, so I want to leave it up to the user. During import, I am recognizing what type of units the import file has, and I need to impose them on the document, and immediately show. I cannot use templates. There is a similar issue when the Units of Measure are updated manually through the screen, they are not reflected.
I'm trying to programmatically toggle a hole between tapped and simple. I found the Tapped property in the object browser but when I try to use it I get a "Method 'Tapped' of object 'HoleFeature' failed" error.
Public Sub setThd(tap As Boolean, doc As PartDocument)Dim hole As HoleFeatureDim holes As HoleFeaturesSet holes = doc.ComponentDefinition.Features.HoleFeaturesFor Each hole In holes If hole.HealthStatus <> kSuppressedHealth Then hole.tapped = tap End IfNextEnd Sub
Is there an easier way to dimension to a virual sharp or place the ordinate dimension origin on a virtual sharp than by trying to drag the point along each line until you get the dotted lines to intersect?
I have a VBA macro that places selected virtual components into an assembly. I can place virtual components with different part numbers into the assembly with no problem. When I try to place the second instance of a virtual component with the same part number I get an error.
For example: If I place a virtual component with the part number C123A456 into an assembly it shows in the tree as C123A456:1 If I try to place C123A456 again it errors at this line.
'Add selected line as a virtual part Set oOcc = oOccs.AddVirtual(sPartNumber, oMatrix)
I can place multiple virtual parts if I append -1, -2, -3 etc to the part number but I would like to let Inventor use the :1, :2, :3 to keep track.
I am using 2012 and am having a problem dimensioning to a virtual sharp.
On the above corner I select the straight edge on top or to the left of the corner. I then right click to bring up the intersect option but the only options I get are one, Snap Settings, Zoom, Pan, and Help.
Do I have a setting off somewhere? Or is there a location where the sharps don't work?
I build a program to "*.dll" by Visual Basic 6.0+AutoCad2006,when it runs in Cad VBA Environment,if it gets error,I try to get start again,It shows message:"Rutime Error 429:ActiveX Component Can't Create Object",and then message "440:Automation error".But sometimes,it works all right.Thats troubled me for a long time,I can't find a reason, so can't improve my program.
I have a script that is perfectly works in 2012 inventor pro version. It moves newly added virtual parts into the VIRTUAL_PARTS folder. Part of script is below:
Dim oFolder As BrowserFolder Dim oTopNode As BrowserNode oTopNode = oPane.TopNode() Dim oTopNodeOcc As BrowserFoldersEnumerator oTopNodeOcc = oTopNode.BrowserFolders For Each oFolder In oTopNode.BrowserFolders i = i + 1 Next If i = 0 Then oFolder = oPane.AddBrowserFolder("VIRTUAL_PARTS", oOccurrenceNodes) Else For Each oFolder In oTopNode.BrowserFolders If oFolder.Name = "VIRTUAL_PARTS" Then For Each oOcc In oAsmCompDef.Occurrences If TypeOf oOcc.Definition Is VirtualComponentDefinition Then oNode = oPane.GetBrowserNodeFromObject(oOcc) End If 'MsgBox(oTopNodeOcc(1).Name) oTopNodeOcc(1).Add(oNode) Next Else ' do nothing End If Next End If
In 2014 pro it works only once, when I add first virtual part. It creates a folder and moves it there. When I add 2nd virtual part it gives me a error
How to add a virtual part from an excel list to assembly using vb.net plugin. I`d like to know how to change i Properties of the virtual part through vb.net.
The iLogic code that I would typically use is:
Dim occs As ComponentOccurrencesoccs = asmDoc.ComponentDefinition.OccurrencesDim identity As Matrixidentity = ThisApplication.TransientGeometry.CreateMatrix Dim virtOcc As ComponentOccurrenceIf v_qty >= 1 ThenvirtOcc = occs.AddVirtual(sVirtPart, identity) Try iProperties.Value(sVirtPart & ":1", "Project", "Description") = oProp1iProperties.Value(sVirtPart & ":1", "Summary", "Title") = oProp1 Catch End Try.......
so for the plugin I need to re-write this
Dim _invApp As Inventor.ApplicationDim occs As ComponentOccurrencesoccs = asmDoc.ComponentDefinition.Occurrences Dim identity As Matrixidentity = _invApp.TransientGeometry.CreateMatrix Dim virtOcc As ComponentOccurrence If vp_qty >= 1 Then virtOcc = occs.AddVirtual(sVirtPart, identity) 'Try ' iProperties.Value(sVirtPart & ":1", "Project", "Description") = oProp1 ' iProperties.Value(sVirtPart & ":1", "Summary", "Title") = oProp1 'Catch 'catch error when oProp1 = nothing 'End Try
How should I re-write the text in bold , so it works?
I would like to include Terminals and other virtual parts in het BOM on my drawing. For this I need to generate a report. I have defined my own virtual parts but somhow their properties are not accessible. You can see 88 items but this is the total of all segements and pins. Somehow partnumbers show as "---". I have included the report configuration file I am using.
I'm currently using Inventor Professional 2012, and have been experiencing problems with virtual memory usage. In past versions of Inventor, the small bar graph counter at the bottom right-hand corner of the screen (Virtual memory counter? Not sure what to call it...) would "re-fresh" after closing a model, drawing, etc. (i.e. Once closing the file, the counter would change from yellow to green, bringing the virtual memory usage back to zero). However, this isn't happening with 2012, and I'm not sure if the problem is the way Inventor was installed onto my workstation, or if it's a problem with the hardware. A temporary solution has been to shut down Inventor when the bar graph gets too far into the yellow range (or red), and then starting up Inventor again.
Specs for my workstation are as follows: Windows 7 (32-bit), processor is Intel(R) Xeon(R) CPU W3503 @ 2.4GHz 2.39GHz, 3GB RAM.