AutoCAD Inventor :: Use ExtendFeature Method Of PartFeature
May 22, 2013
I need to get familiar with the Inventor API for my thesis.Currently, I need to extend the face of a part.I started with selecting the face edge by
Dim ActiveDocument As Inventor.Document
Dim spline As Object
Set spline = ThisApplication.CommandManager.Pick(kPartEdgeFilter, "please choose the face edge!")
This is working fine.I know that the next step would be to use the ExtendFeature method of PartFeature, but I do not know exactly how to do this. Do I need to get the face as parent of the edge? How can I invoke the extesion then?
i have a problem in Inventor 10 with the add method, which i didn't have in inventor 8, it's very puzzling. I open an assembly, add some parts (this goes without problems) then i open another assembly, change some stuff,close it again, so i'm back in the first assy and then the next add method fails.
Public Sub AddOccurrence() ' open assy Set oAssy = ThisApplication.Documents.Open("C:TempAssy.iam", True) ' Set a reference to the assembly component definition. Dim oAsmCompDef As AssemblyComponentDefinition Set oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition [code]....
I am trying to display the Tags and Values of an inserted AutoCAD block in an Inventor 2013 dwg. I am using .Net studio10.I can list the properties of the block object but cannot get the "GetPromptTextValues" method to work. Problem is at the bottom of the code listed below.
' Connect to a running instance of Inventor.Dim invApp As Inventor.Application' Check to see if a drawing is active invApp = System. Runtime. InteropServices.Marshal.GetActiveObject("Inventor.Application") If invApp.ActiveDocument.DocumentType <> Inventor. DocumentTypeEnum. kDrawingDocumentObject Then MsgBox("Need to have a drawing document active")Return End If ' Create ref to active drawing document Dim oDrawingDoc As Inventor.DrawingDocumentoDrawingDoc = invApp.ActiveDocument. [code]....
While looking at the different tolerance methods, I see a couple called MIN and MAX, which just tack these words to the end of the dimension. Is there a way to customize the tolerance methods to add suffixes or prefixes to dimensions, such as TYP or 2 PLCS or something like that, so that I can minimize my detailing time.
Basically a project could contain one idw file, or it could contain 20 idw files or 100 or more.
Our titleblock has about 12 entries of project information that will be consistent on all sheets whether that's one sheet or a 1000 sheets.
Is there a way to link an excel file to each idw? (I'm pretty sure not : ) ) or some way to have a central repositor for those properties so that if something changes, we don't have to go back and change each idw?
I have seen the drawing transfer management wizard, but it seems like overkill to a situation that has to have existed a long time - that being needing customer info on a titleblock. Seems like it'd be the perfect think for linking an excell file or having actual properties in the project file.
Looking for the method to query oDrawingDims.Tolerance. to see if SetToSymmetric (.0625) is the current value for a given dimension.
oDrawingDims.Tolerance.Type results in 50377984, no matter what method is active in the dimensions.
From Here. You get the Loop to reset,
'symmetric example' Set a reference to the select set of the active document. DimoDocAsDrawingDocumentoDoc=ThisApplication.ActiveDocument' Find all selected occurrences and add them to an ObjectCollection.DimoDrawingDimsAsDrawingDimension'Loop through all dimensionsForEachoDrawingDimsInoDoc.ActiveSheet.DrawingDimensions'set Tolerance MethodoDrawingDims.Tolerance.SetToSymmetric(0.5)Next
As well as this code to reset to default if a tolerance falls with in a certain set values,
' Set a reference to the select set of the active document.DimoDocAsDrawingDocumentoDoc=ThisApplication.ActiveDocument' Find all selected occurrences and add them to an ObjectCollection.DimoDrawingDimsAsDrawingDimensionForEachoDrawingDimsInoDoc.ActiveSheet.DrawingDimensions'Loop through all dimensionsIf oDrawingDims.Tolerance.Upper = ("0.15875") And oDrawingDims.Tolerance.Lower=("0")oDrawingDims.Tolerance.SetToDefaultEndIf Next
Is there any better method to find the overall size of a part model? I tried Range Box method and that gives some inaccuracy if the model have loft feature and fillet on that. But if I use GetExistingFacets the size gives more accurate. At the same time in a round part model with a cut, the GetExistingFacets give inaccuracy and range box method gives better result. Below is the X, Y, Z sizes of the two models with the above mentioned methods.
Round Part (Part1)
Measured with GetExistingFacets method = 129.934196472168 x 126.422719955444 x 25 Measured with Range Box method = 130 x 126.514225996919 x 25
Rectangular Part (Part2)
Measured with GetExistingFacets method = 300 x 300 x 30.0000286102295 Measured with Range Box method = 300 x 300 x 30.4094903224854
I have found that if I use the drop-down to select a new part file, it does not use the default (and only) part template in my templates folder. I know this as there are several settings that do not match. If I click on the icon to open the new part dialog, it displays my templates (part, assy & drw) and creates the new file based on those accordingly.
Any setting that needs to be changed to correct this behavior?
What is the data type for the second parameter of retrieve dimension method? Coz it's optional parameter.Retrieve(ViewOrSketch as Object, [DimensionToRetrieve]) as GeneralDimensionEnurator
We've tried to put the parameter name of the model as parameter but error had occured "DATA TYPE MISMATCH".Here's our
Please see attached image (I have tried to attach the part file but file size is to large to upload). I have created a sheet metal part, then converted to a solid component to utilize the bend tool. The actual part will need to overlap at the ends and will be joined using spot welds. I would like to be able to illustrate the overlap in the inventor model if possible but how to achieve this.
Before I call it a day and revert to AutoCAD or sketch this into a IDW,
Is there a way to use iLogic to replicate the old-school method of replacing drawing references? (ie, where you'd temporarily rename the originally referenced file, open the drawing, and then point it to the new file after Inventor says it can't find the original)
Longer version:
I have an iLogic configurator that manipulates skeletal models, copies them out as new files, and swaps them into template drawings. The original skeletal model can be configured in several different ways (different features, surfaces, etc), so I have several template drawings set up for each model depending on the configuration.
The problem that I'm encountering involves the order in which the drawing is loaded and then has its references replaced. When first opened, the drawing loads the original skeletal model which doesn't have all the geometry of the "new" model for which the particular template drawing was intended. This makes most of my section and detail view constraints go belly-up. After subsequently replacing the model references with the "new" model with the correct geometry, the section and detail view constraints fail to resolve themselves, and my once-perfect detail drawing is ruined.
If I instead force the drawing to open with the new model from the git-go (via the workaround discussed above), everything loads perfectly. However, I haven't yet found a way to handle this automatically with iLogic.
FWIW, I am currently using the following code in a subroutine:
At some point in my code I used to call AutoCAD 2012 this way:
AcadApp = GetObject(, "AutoCAD.Application.18")
This procedure does for some reason not work in AutpCAD 2013
AcadApp = GetObject(, "AutoCAD.Application.19") produces an error
If if dim AcadApp as object I get a <COM Type> object (which I cannot use or convert to AcadApplication)If I dim AcadApp A AcadApplication i get this exception:
{"Unable to cast COM object of type 'System.__ComObject' to interface type 'Autodesk.AutoCAD.Interop.AcadApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{2959C1CC-8577-4EDB-ADDC-6EBBAB147926}' failed due to the following error: En sådan grænseflade understøttes ikke (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."} System.Exception
SSA rational method. I have to compare results of rational method between SSA and another product. Plain rational method, steady flow, Darcy-Weisbach. Times of concentration (TOC) are manually defined.
I played a bit with the units, formulas, IDF curve is defined as pair of values time/intensity. Seems that I achieved something. Results are more or less similar, but there are some differences. After playing with both programs, comparing in Excel, think that I found what is different.
So, I have very simple example, of one channel with catchment areas. All areas have the same runoff coefficient – 0.8. Pipe diameters are constant (500). The whole analysis is restricted between 5 and 10 minutes of rain duration (5 min-397.22 l/s/ha and 10 min – 321.53 l/s/ha). I converted IDF to mm/hr. So I have the next example:
[picture in attachment]
In theory, what I learned about rational method, there is next definition:
Intensity from IDF curve is defined by TOC. TOC is defined by sum of „entrance time“ (which is defined by shape and size of catchment area) and sum of upstream flow times. In my example I defined 5 min for every area.
So, for example for pipe nr. 3, TOC is calculated:
TOC_3 = Entrance time for area 3 + Tflow_1 + Tflow_2 + Tflow_3
For example:
TOC_3 = 5 min + 0.67 + 0.45 + 0.51 = 6.63 min
That TOC_3 (6.63 min) is base for reading appropriate value of intensity (I_3) from IDF curve. The flow in pipe 3 is then calculated:
Q_3 = I_3 * (A1 * k1 + A2 * k2 + A3 * k3)
This is the way how I learned rational method. But results between SSA and another product (which works in a way explained above) are different. Differences increase downstream.
After playing with results in Excel, I found out that SSA does not summarize in TOC all flow times upstream. So TOC in SSA is calculated simply by initial entrance time and flow time in specific pipe:
TOC_3 = Entrance time for section 3 + T_flow_3
So, there is no time added from T_flow of pipes 1 and 2. Seems that it is major difference which leads to final results differences. I tried to understand all options of SSA to find possibility to add upstream flow times, but without success.
A while ago my dynamic input method went from aligned to some sort of midpoint angled method. Not even really sure. What this is / how to change the input method?
C3D 2012. I am trying to get the distance from the start of a featrue line to a selected point. My object is "FLobj" and my Point is PT1. I am using the method Get2dDistanceAtPoint. This is the line of code.
I'm new in civil 3d road design so my question may be basic.when i prepare a corridor and proceed to get cut and fill it appears as zero.i think i made some mistake at a stage when in section line we decide surfaces..step wise from section line selection to cut/fill calculation also give me the general concept regarding selecting surfaces during cut/fill volume calculation?
I used it to clear out the old vertex information, and then add new vertex points.All works on the screen until you use the undo command then all the vertex points are lost. Just created new polylines and deleted the old to fix it. Not ideal as I was storing the ObjectId’s in Xrecords, which now have to be updated with the new id’s
For AutoCAD 2006, I have an entity that I am changing properties of, but I cannot figure out how to set the colormethod to "By Layer." I am sure that I am missing something, but I am at my wit's end.
I would like to be able to have the screen refresh periodically to show the new objects I have added as a command method proceeds to execute. I am hoping to be able to achieve a kind of simple animation by doing this, and also to show progress while a computationally intensive operation is under way. Is there a way that I can do this?
I have tried using AcadApp.DocumentManager.MdiActiveDocument..Editor.Regen() and also .Editor.UpdateScreen(), but it only seems to work once and not multiple times. Do I have to commit the transaction and then .