AutoCAD Inventor :: VBA Code To Get Coordinates Of Each Part Of Assembly
May 9, 2012
I try to develop a vba code to get the coordonates of each part of an assembly and after export them to an excel file.
I build this :
Public Sub Export_Layout_COG()
If MsgBox("Cette Macro va exporter les coordonnées du COG de chaque layout, continuer ?", vbYesNo) = vbYes Then
Dim RefDoc As Document
Set RefDoc = ThisApplication.ActiveDocument
Refdocdisplayname = RefDoc.DisplayName
The code return an error on the red line, I don't catch why?
Dear Sir, In particular project, when I insert part in Assembly file, It is inserted as a Tube & Pipe run part. so that It is not Grounded automatically. What is the settings by which I can insert as a normal part in assembly file ? I have attached herewith the JPG file also.
I`m looking for the iLogic code that can change one parameter (user defined) for each (ipt) part in assembly (iam)
The one below doesn`t work.
Sub Main Dim oApp As Inventor.Application = ThisApplication Dim oAssy As Inventor.AssemblyDocument = oApp.ActiveDocument For Each oSubDoc as Inventor.Document In oAssy.AllReferencedDocuments On Error Resume Next Parameter(oSubDoc, "FH") = 15.26 Next End Sub
I would like to simplify this assembly into one seamless part for FEM calculation:The assembly consists out of parts that, in reality, will be welded together. Due to their form, there is no way to place them exactly onto each other, therefore there are slight gaps between the parts:
Now when I try to merge the assembly into one part via "simplify" --> "create simplified part" and choose "single solid body with seams between planar faces merged", Inventor does not fill these gaps (even though it displays only one part in the bottom right corner of my window). Unfortunately, the remaining gaps brings "contact" problems in the FEM simulation.
how to close the gaps and really merge the assembly into one part?
I have a part that has protrusions. When i mate that part up to another part that second part needs to have cutouts/holes to receive those protrusions.
i mainly use it in sheetmetal parts. and use the rectangular protrusions on de contour to mate up with corresponding cutouts in the other sheet. this works with positioning and also makes for a nice weld spot/area.
But also for making holes to accommodate a mold pin used in custom punch dies. I want the intervening part to receive a corresponding (propperly tolleranced) hole automatically. Much like a bolted connection does.
same for parts like circlips. i want them to automatically generate the seat in the part it's mated to. Rather than using the axle generator.
Ofcourse one can place the parts and do an in assembly interpart projection and go from there, but i want the part to generate the (predifined) modification to the other part. It would save time and also reduces problems as the parts are moved about or even removed.
I have an assembly with 10 parts in it. We use many assembly features at the assembly level (Revolve cut, Extrusion cut..etc). How to find the mass difference of each part by comparing at its parts level and its assembly level.
I have a two part duct fire damper assembly. The IDW has the combined two part assembly, which I know how to turn the CoG on, so that it can be dimensioned. The problem is each piece will more than likely be hoisted separately so I would like to show the CoG for each piece, not the combined master assy.is there a way to do this?
Inventor 2014 Windows 7 Pro SP1 Intel(R) Core(TM) i7-3770k CPU @ 3.50GHz 16GB RAM NVIDIA Quadro 4000 3D Connexion SpaceMouse Pro
I have assembly file in which I have created a work plane "Work Plane19" . Now I wanted to create a new work plane which will be paralle to workplane "WorkPlane19" & offset by 10.5 mm in same assembly document through VBA subroutine. I have tried with following code but getting error,
Public Sub NewWorkPlaneCreate() Dim oAssly As AssemblyDocument Set oAssly = ThisApplication.ActiveDocument
Is it possible to pull out the x,y,z coordinates to text file from a inventor part. I am aware about this that it maybe need some programming but what kind of programming Language is the best to use ? is it possible to use the build in programming Language called Ilogic? Or is it better to use some .net? At my work we use PDMS to do plant modelling and we want to use inventor for modelling the machines and doing the workshop drawings ect. And we want to be able to take the inventor part coordinates and transfer them to PDMS because it can model the machines just by coordinates taken from a text fil.
I have build a solid in inventor. I want to optimize the model in ANSYS, so I need the ANSYS code of the geometry. If I import a file into ANSYS (i´m importing .SAT and x_t parasolid) the geometry code does not show.
how can I save a part in inventor with ANSYS code, or any way to convert any CAD format to ANSYS code?
At my company we use part numbers as file names for everything. for example, part number 09090P00100000, will be saved as 09090P00100000.ipt and will have a drawing saved as 09090P00100000.idw.
Within the drawing template file, i want to set up an ilogic rule that will check that the part present in the drawing corresponds to the file name of the drawing. This rule will run after saving and will just display a warning if the file names do not correspond.
I just need some code that will get the file name of the part displayed in the drawing. Note that we use iparts so the code must get the member file name and not the factory file name.
Dim oDrawingDoc As DrawingDocument oDrawingDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet oSheet = oDrawingDoc.ActiveSheet
Autodesk Inventor Professional 2011 Windows 7 Enterprise, 64-bit
I am capturing a book-case design that I made long ago into Intentor. I am almost finished, and I want to produce .dwg files and a bill of materials of parts that can be held.
For various reasons, almost all the items in the existing design are assemblies, and the underlying parts correspond more or less to half of physical parts that are contained inside a repeating cell. I will almost certainly continue using this approach.
A simplified design that shows this is at [URL]..... in the file Display.iam
I created the file Slat.ipt by using derive (Slat.iam).
If I replace the Slat assemblies with the file Slat.ipt, the bill of materials will show parts that correspond to physical parts that I can hold in my hand, or list on an invoice. I can do this with many, many mouse operations.
To make this modification quickly, I attempted to do Component -> replace on the Slat assembly. I use this operation a lot to replace one version of an assembly with another. When I do it with a .ipt file, the system pauses for some tens of seconds, then crashes.
A brute force work around is to use the mouse to do the replacement, essentially rebuilding the entire project in place.
as you can see from the image, the blue cone isnt transparent. i set the material properties to "clear blue" to make it "see through", i want to show whats under the cone. however the cone isnt transparent. how can i get the cone to be transparent? is there a step im missing?
I have written a program where i will copy inventor assembly tree to custom form in tree format. Now my problem is whenever i click a part in tree i must edit the part. I am trying to access the Fx parameter/IAssembly to use it but not getting desired results .
I need to use parameters of a part in an assembly. How to do this? Do i need to define a rule? How is this done?
Can i do it without using an Excel sheet as a parameter source for both the assembly and the part? The target is to have inventor update an array of assets as soon as the width of a part is changed whether in Excel or in the Factory properties of the asset.
I have an assebly where i have imported parts and other assemblies. Unfortunatly during process of assigning them together they have rotated by various angles.Is it possible to somehow "reset" the rotation of part according to global xyz?
My need is to assembly parts into an assembly by a known position in the assembly. The part has a UCS and I create UCS on the assembly programatically. What I cannot do is to constrain the two UCS. I tried this (Inventor 2013 x64 on W7/W8 64, c++ 2010 by the way DEBUG mode is not working from the IDE):