AutoCAD Inventor :: Create Workplane From A Face In Assembly Document

Jul 15, 2011

In an assembly document, I try to add a MateConstraint between male and female side of an 45 degrees elbow. The male side is built on the XZ Plane and Y Axis And I try to create a workplane on the female face.

But a got an error with the last line of code.  Here's my code (vb.net code) :

' Get application object
Dim app As Inventor.Application = GetObject(, "Inventor.Application")       
Dim doc As Inventor.AssemblyDocument = app.ActiveDocument           

[Code] .......

View 3 Replies


ADVERTISEMENT

AutoCAD Inventor :: Create Workplane From Selected Face?

Nov 14, 2012

I am working on a project were I need to select a face and create a workplane out of such face, see the figure attach. my language of choice is C#. 

Here is what I think it should be done, my proble is that the oWork (the workplane I just created remains null) and the whole project crashes.
 
private Inventor.Application mApp = null;.....if (((mApp.ActiveDocument != null))){
if ((mApp.ActiveDocument.DocumentType == DocumentTypeEnum.kPartDocumentObject)){
PartComponentDefinition oPartCom = mApp.ActiveDocument as PartComponentDefinition;
PartDocument oDoc = mApp.ActiveDocument as PartDocument;if ((oDoc.SelectSet[1]) is Face){
System.Windows.Forms.MessageBox.Show("You just selected a surface", "Surface Evaluator");Face oFace = oDoc.SelectSet[1] as Face;
WorkPlane oWorkpl = oFace as WorkPlane;
PlanarSketch oSketch = oDoc.ComponentDefinition.Sketches.Add(oWorkpl, false);
//WHAT AM I DOING WRONG?
}}}

View 4 Replies View Related

AutoCAD Inventor :: How To Create Workplane From A Face Using Select Set

Nov 8, 2012

I am making a C# Add-in, I need to create a plane from a selected face, I am using the following code, but I am getting stuck.

if (((mApp.ActiveDocument != null)))
{
if ((mApp.ActiveDocument.DocumentType == DocumentTypeEnum.kPartDocumentObject))
{
PartComponentDefinition oPartCom = mApp.ActiveDocument as PartComponentDefinition;
PartDocument oDoc = mApp.ActiveDocument as PartDocument;
[code].......

View 2 Replies View Related

AutoCAD Inventor :: How To Select Workplane In Drawing Document With API

Jun 18, 2013

If i made a workplane include in a drawing document with api, then it will display in the view as a center line.

I want add some note to the Center line,but i didn't know how to select it with api, Is there have the API function to do this work?

View 2 Replies View Related

AutoCAD Inventor :: Create New FeatureBasedPattern Within Assembly Document

Dec 6, 2013

if there is any way to create a new 'FeatureBasedPattern' within an assembly document. I have 2 assembly occurences - parts. In the Part1 i created a RectangularPattern of workpoints. The Part2 is going to be used in the new pattern. I tried the following VBA code, but it doesn't work.

Dim oPart1 As ComponentOccurrence
Set oPart1 = oAssDef.Occurences.Item(1)
Dim oPart2 As ComponentOccurrence
Set oPart2 = oAssDef.Occurences.Item(2)
Dim oTG As TransientObjects
Set oTG = ThisApplication.TransientObjects
[code]...

The Call function breaks with: "Invalide procedure call or argument". I also tried "Set oAssemblyPattern = oAssDef.OccurencePatterns.etc...." instead of Call function, but with the same result. Same error for declaration change of "oAssemblyPattern" to "FeatureBasedOccurrencePatternProxy".

View 1 Replies View Related

AutoCAD Inventor :: VBA Code Not Working For Workplane In Assembly

Oct 15, 2004

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

[Code].....

View 6 Replies View Related

AutoCAD Inventor :: Create Dimension On Drawing Document Between Two Parts In Assembly

Feb 8, 2010

From a VB.Net program, I'm trying to create a dimension on a drawing document between two parts in an assembly. I can get the parts using component occurrence. The line marked below throws the following error: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)).

As you may see, I have allocated memory for both "Edge" and "Face" (Dim oEdge1 As Face) albeit one is commented out. Attached is the screen shots from the attribute helper add-in. In it, you will notice that the attributes are of type: "Face".

Public Sub CreateDrawingDimension(ByVal Part1 As String, ByVal Part2 As String, ByVal AttName1 As String, ByVal AttName2 As String)
' Get the Active Drawing document
Dim oDrawDoc As Inventor.DrawingDocument
oDrawDoc = invApp.ActiveDocument
[code]........

View 2 Replies View Related

AutoCAD Inventor :: Create A Workplane With The API That Is Tangent To A Surface

May 18, 2006

How can I create a workplane with the API that is tangent to a surface and passes thru a workpoint. It is easy to create a work plane of type kPointAndTangentWorkPlaneDefObject by point and click in Inventor 11, but I can't figure out how to do it in the API.

View 5 Replies View Related

AutoCAD Inventor :: Create WorkPlane By Point And Line

Apr 5, 2013

I am trying to create a workplane by a point and a line.  I can do this maually, but have not been able to reproduce this in code.

BTW: I realize I can create a fixed workplane by using the point, the edge, and an edge perpendicular to the edge, but I cannot have this as a fixed workplane.

View 6 Replies View Related

AutoCAD Inventor :: Best Way To Create A Workplane At Angle On Tube Surface?

Aug 1, 2013

What is the best way to create a workplane at a given angle on the surface of the tube. Imagine the workplane long and thin running along the surface of the tube. The angle will be a parameter (from a sketch or user).

I'd like the workplane to always be on the surface of the tube, even when the diameter of the tube (from a dimension in a sketch) changes.I'm thinking that a (angled) line in the same sketch as the two circles (which define the tube diameter and thickness) would be a good starting point.

View 9 Replies View Related

AutoCAD Inventor :: Proxy Of Workplane Inside Pattern / Inside Part / Inside An Assembly

Oct 14, 2013

There are many examples of creating rectangular patterns, but not many, if any, of interrogating existing patterns.I have attached the files and a screenshot of a rectangular part inside an assembly. The part contains a rectangular pattern of holes and workplanes.how do I get hold of each proxy of the workplane in the pattern?In other words I don't know what to put in the for loop at the end of this code fragment:
 
If _invApp.Documents.Count = 0 Then MsgBox("Need to open an the assembly document") ReturnEnd If If _invApp.ActiveDocument.DocumentType <> DocumentTypeEnum.kAssemblyDocumentObject Then MsgBox("Need to have an Assembly document active") ReturnEnd If Dim asmDoc As Assembly Document asmDoc = _invApp.ActiveDocument Dim asmDef As AssemblyComponentDefinition asmDef = asmDoc.ComponentDefinition im occurrences As ComponentOccurrencesoccurrences.
[code]....

View 5 Replies View Related

AutoCAD Inventor :: ILogic Select Face In Assembly

Mar 6, 2012

I need to be able to pick a face on a part in an assembly inside a iLogic rule. How can I set up the events to suspend the code to have the user pick the face?

View 6 Replies View Related

AutoCAD Inventor :: Change Color Of A Face In Assembly

Jan 9, 2013

There are instances where we need to add an extrusion in an assembly (.iam) to show labeling that needs to be done on the floor during assembly.

So we do a new sketch to the face where we need to add the "label", we use text and extrude it 0.001" deep (cut).

On the drawing (.idw) you can see it no problem, but in the model (.iam) itself it's hard to see since the faces that result from the extrusion are the same color as the participant part.

My question is this:  Is it possible to change the color of the face of the extrusion?

It's not super important but it would be a good thing to show that detail as we sometimes print a color version of the 3D view for prototyping, troubleshooting, etc.

View 9 Replies View Related

AutoCAD Inventor :: Add Sketch To Part Using Face Referenced From Assembly

Jan 24, 2012

what im trying to do is select a face in an assembly and create a sketch on it in the part level

this is just one step in the program im trying to make the overall program will create a tube frame and the tubes will be driven from a base solid

Sub test1()
Dim asmDoc As AssemblyDocument
Set asmDoc = ThisApplication.ActiveDocument
Dim asmDef As AssemblyComponentDefinition
Set asmDef = asmDoc.ComponentDefinition
[code]......

View 1 Replies View Related

AutoCAD Inventor :: Center Of Gravity On Curved Face Of Assembly

Aug 1, 2013

I am trying to pinpoint the center of gravity on a curved face of an assembly. I can use the c og G command to get the true center of gravity but i would like to incorporate lifting eyes into the finished assembly. Basically I need to know how to find the C of G on a given surface. I have attached the assembly I am working on and added lifting eyes roughly where I would like them. I have tried measuring from the C of G to a face and then creating the lug above the C of G but somehow it doesn't line up.

View 7 Replies View Related

AutoCAD Inventor :: Change Appearance Of Face In Weldment Assembly Environment

Jan 29, 2013

I was wondering if there is a way to change the appearance of a face in a weldment assembly environment. I have a weldment which in the machining process a part of weld bead as well as a portion of one of the components is machined down (spot faced) and I need to change the appearance of those face to polished, but it doesn't let me do that?

View 3 Replies View Related

AutoCAD Inventor :: Get All Reference Document Without Opening Assembly?

Mar 22, 2012

in inventor VBA, is it possible to get all reference documents without opening an assembly file in inventor?

this is i am using right now,

Dim oAssyDoc As AssemblyDocument
Set oAssyDoc = oInvApp.Documents.Open(sAssyPath)
oAssyDoc.Update
Dim oAllRefParts As DocumentsEnumerator
If Check1 = True Then
Set oAllRefParts = oAssyDoc.ReferencedDocuments
Else
Set oAllRefParts = oAssyDoc.AllReferencedDocuments End If

Autodesk Inventor Professional 2014
Autodesk Product Design Suite Standard 2013
Microsoft Office 2007 & 2013
Windows 7 64bit
Synergis Adept 2013
Visual Studio Express 2010

View 6 Replies View Related

AutoCAD Inventor :: Copy Assembly Document To Another Folder

Jul 25, 2013

Can I copy and past an assembley file to another folder in my system,as like as packandgo using inventor api ?

View 2 Replies View Related

AutoCAD Inventor :: If Statement Between Part And Assembly Document

Oct 11, 2011

I'm trying to write my first VBA program for Inventor with very little programming experience.  I would like to create a userform which displays the materials list within a combobox.

The problem I have is that I would like the userform to remain open no matter which type of file is active. I would like the combobox to display the material list and current material when in a Part file and display N/A when in Assembly file.

View 3 Replies View Related

AutoCAD Inventor :: Convert Assembly Into Text Document

Dec 5, 2011

I've tried opening an Inventor Assembly file (.iam) with Microsoft Word, Notepad, and Wordpad but there is a big problem with text conversion.  When I open them I get radical characters that makes it impossible for me to make sense out of.

My hope was to open an assembly file as a text document and modify it to get a different result when opening the model (i.e.- moving a part from one position to another in the assembly by modifying text).  Sort of like when I modify a post processor in MasterCAM to produce a different program with if/then statements or changing text.  Ultimately I want to create an assembly model that reflects our inventory as sort of a "virtual warehouse" where a quick look at the model would let you know where you have space to move and store new inventory.

I think being able to modify inventory locations by modifying text and letting the model update would be faster and easier than someone modifying the model at the end of each day with Inventor.

Is there any type of text conversion software that could take an Inventor assembly file and convert it into readable text?

View 8 Replies View Related

AutoCAD Inventor :: Create Sketch On Face For Extrusion?

Jul 25, 2008

I am trying to create a sketch on a face for an extrusion. The sketch has a text box. I am having trouble excluding the text in a sketch otherwise all the closed geometries of the text get extruded.

I created an objectCollection and excluded the TextBox objects. Still not working.

View 6 Replies View Related

AutoCAD Inventor :: Create Human Mask For Humanoid Face

Apr 5, 2013

We intend to create a human mask for our humanoid face.  Wonder where I could download a CAD model where I could thicken the surface to form the mask.

View 6 Replies View Related

AutoCAD Inventor :: How To Put IFeature On Workplane

Aug 12, 2013

I want to put my iFeature on my workplane,but i can't.However, if I change my PlaneInput = oFace , it can work perfectly.My program is below:

Private WithEvents oInteraction As InteractionEvents
Private WithEvents oselect As SelectEvents
Private Sub UserForm_Initialize()
    Set oInteraction = ThisApplication.CommandManager.CreateInteractionEvents
    Set oselect = oInteraction.SelectEvents

[code]...

View 1 Replies View Related

AutoCAD Inventor :: Option To Merge Bottom Face Of Pad Eye And Pipe Curved Face

Oct 15, 2012

There is any option to merge bottom face of pad eye and pipe curved face... Something like

1. Extrude face to a surface  or
2. like notch option available in frame generator ?

N:B - pad eye is made by extrusion and pipe made by frame generator.

View 2 Replies View Related

AutoCAD Inventor :: Associating A Workplane With A Block

Dec 3, 2012

I want to use a lofted solid as a component in an assembly. I am using a top-down approach with 2D blocks to get the kinematics right before creating the components.

My problem is that the sketches needed to create the loft are on workplanes, and those workplanes are fixe with respect to an absolute coordinte system.

Is there a way to assosiate workplanes with a block instead, so that they will move with the part?

Is it possible that the problem is trying to do this in a part file, and that if I place the finished solid in an assembly it will then be able to move? ( I am fairly new to Inventor.)

View 1 Replies View Related

AutoCAD Inventor :: Moving A Fixed Workplane?

Jan 6, 2014

I created a sketch on a 'fixed workplane' and extruded it. I would like to know if it is possible to move the workplane? I understand I can change the workplane if it is a 'plane by offset from plane'.

If moving a fixed workplane is possible, does the extruded features move along together?

View 2 Replies View Related

AutoCAD Inventor :: Can't Create DWG From Assembly

Mar 15, 2012

I can't create a dwg from an assembly because it's telling me that "The factory must be updated before views of it's members can be used".  What does this mean and how do you update the factory?

View 4 Replies View Related

AutoCAD Inventor :: Merging Circular Face To Flat Face

Aug 22, 2012

All I need to do is merge a circular face to a flat face, so both faces become one continuous face. Is this possible at all?

I have a attached a screenshot to show what I mean. Face 1 needs to be merged with face 2. This is so if I constrain anything to that face it will constrain to the entire face and not either the circular face OR the flat face.

View 3 Replies View Related

AutoCAD Inventor :: Create Exploded View In Presentation Document Via API

Nov 7, 2012

Is it possible to add an exploded view to a presentation file via the api?  I can access existing exploded views, but did not see an add method.

View 2 Replies View Related

AutoCAD Inventor :: How To Create A Line With Part Document Setting

Jul 13, 2012

My part unit length has been setup as millimeter(mm).Once I created a line within 2d sketch by VBA script, the result of length always become to 10 times of value.For example, the two points of line is (0,0) and (0,4). But the result of length measured is 40.

My problem is how to create a line with part document setting?

View 1 Replies View Related

AutoCAD Inventor :: Create New Base View In Drawing Document

Jul 13, 2009

I am trying to create a new base view in drawing-document.

I can get hold of the view but cant find a way to set reference data --- would like to set the "Line Style" to "As Parts" and "Hidden Line Calculation" to "All Bodies".

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved