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
I don't fully understand what an objetctId is,and how to make good full use of an ObjectId.How to use the GetObject() method.For example,I create a polyline and add this polyline to an ObjectIdcollection.Now,how can I identify this polyline via the ObjectId?
When I am asked for the Profile Origin the cursor is like a standard Windows Arrow pointer and won't let me select a point for the origin.If I use a polyline for the quick profile all works as expected...
IDSP Premium 2014 (mainly Civil 3D 2014 UKIE SP1 & Infraworks with some limited 3ds Max Design) Win 7 Pro x64, 256Gb SSD, 300Gb 15,000 rpm HDD 16Gb Ram Intel Xeon CPU E5-1607 0 @ 3.00GHz (4 CPUs), ~3.0GHz NVIDIA Quadro 4000, Dual 27" Monitor, Dell T3600
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]....
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.
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]....
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?
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.
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.
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.
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 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 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 .
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
GetXData is a method of the selected object I am calling vlabl.
I can't figure out exactly how to get this to work. The method list says GetXdata(3).
When I try
(setq xdater (vlax-invoke-method vlabl 'getxdata x y z))
I get an error: error: ActiveX Server returned an error: Parameter not optional
If I try
(setq xdater (vlax-invoke-method vlabl 'getxdata 5 5 5)) ;shouldn't this retrieve the values of the array as double double double?
I get nil. No error, just nil. Does this mean there are no values in the array or am I missing a step that lets me read the array?
I was able to convert from variant to safearray for another routine I wrote yesterday, but that variant came from a get-property, not a method. As you can tell, I have hit a wall.