AutoCAD Inventor :: Get Coordinates Of Workpoint Using Ilogic?
Mar 5, 2013How to get coordinates of a workpoint using iLogic.
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
How to get coordinates of a workpoint using iLogic.
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
Simple question: How do you add a WorkPoint in an Assembly? I was hoping to find something like:
dim pt as new point ( 0, 0, 1)
oPartDef1.workpoints.add(pt)
~OR~
dim pt as point
pt.setlocation(0,0,1)
oPartDef1.workpoints.add(pt)
[code]....
It seems like I need to make a geometry (i.e. thisApplicaiton.TransientGeometry.CreatePoint(0,0,0) ) but I cannot find this feature for a component Occurence. I don't want to make a "Global" point, I want to make a point "Local" to a particualar part.
I have a subroutine which creates a WorkPoint with respect to some adjacent components in an assembly. As it happens, this subroutine is called twice; once for each of two different instances of a class. The particular snippet within the sub is:
Dim LowerYPt As WorkPoint = Nothing
Try
LowerYPt = AssyCompDef.WorkPoints.AddFixed(TG.CreatePoint(thisX, thisY, thisZ))
Catch ex As Exception
MsgBox(ex.ToString)
End Try
At least one of the X, Y and Z values are different for the two passes.On the first pass, it runs fine. On the second pass, I get a runtime error:
“System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) at System.RuntimeType……….”
Using API is there a way to add a WorkPoint where an Axis and a Part Face Intersect?
I need this to be able to create a WorkPlane normal to the surface of the part at that location.
Is there a way to extract the cavity (C015-G) from the block on the workpoint of the block
View 9 Replies View Relatedhow can I close an iLogic Form from either an iLogic Rule, or a VBA Rule (VBA is the Preferred method)?
View 5 Replies View Relatedi am trying to translate a Point coordinates from Paperspce to world coordinates in model space.The code i used in Land2006 worked OK but now in Civil3d 2012 it doesn't!
Private Sub GetPlais_Click()
Dim tmpnt1 As Variant, tmpnt2 As Variant, tmpPnt1 As Variant
Dim lole(0 To 2) As Double, upri(0 To 2) As Double
Dim returnobj As AcadObject
FrmGrid3.Hide
On Error GoTo Eline
ThisDrawing.Utility.GetEntity returnobj, tmpPnt1, "ÅðÝëåîå ôï ViewPort ðïõ èá äçìéïõñãçèåß ï êÜíáâïò!"
If TypeOf returnobj Is IAcadPViewport Then
[code]........
I'm a GIS analyst trying to learn Cad. I'd like to place a single point in autocad model space at a specific Northing/Easting position. After reading several forum threads I don't think CAD allows me to change the coordinate system of model space from map coords to northing easting coords, as we can in GIS.
View 5 Replies View RelatedI need to get the dimensions of a lot of centers from parts in a drawing for inspection with a laser tracker.
Is there a way of setting a point from an reference and get a table of the values from the centers I select (x, y and z).
I need to get all the coordinates from the blue and white parts (inside and outside)...
I have a 3D part that produced from an assembly document. (pic.1). How can I take the coordinates of the curve that is designed on the right surface (pic.2) in a .txt or better .xls file ?
That curve I want to draw it in Excel.
For almost a decade I'm used to AutoCAD standard 3D coordinates display: X to right, Y away and Z straight up. For some reason Inventor is configured differently: X to right, Y straight up and Z toward you.
View 3 Replies View RelatedIn Inventor, I want to look for a table called "MS6 Report". If the table exists, I want to get its coordinates, and delete the table. If it doesn't exist, I'd just like to let the user place a table. How can I check if a customtable by this name already exists in the document? Here is what I have so far...
if (aDoc.ActiveSheet.CustomTables.Equals("MS6 Report")){//get table coordinates//delete table }else {userInteract = m_inventorApplication. Command Manager.CreateInteractionEvents();keySelect = userInteract.KeyboardEvents;keySelect.OnKeyDown += new Keyboard EventsSink_ OnKey Down EventHandler(keySelect_OnKeyDown);mouseSelect = userInteract.MouseEvents;mouseSelect.OnMouseDown += new MouseEventsSink_ OnMouse DownEventHandler(Table_Update_Placement); }
The else statement works great. No problems there. How can I find, get coordinates of, and delete a custom table by the name of "MS6 Report"?
How can I change the coordinates directions? You know X to -X or Y to -Y.
View 4 Replies View Related Im doing some pictures for a broschure.
There are several products to render out and I like each product to be viewed in same position.
When i rotated the product in a view i like can I save the position coordinates and set them later in another product?
get the same view position all the time?
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.
View 1 Replies View RelatedI 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
[Code]...
The code return an error on the red line, I don't catch why?
The coordinates that we can apply in Revit (project/shared) aren't exactly the same to have real world projection coordinates (WGS84)??
If not how can we convert the revit shared coordinates to real world projection coordinates?
Why is it, when I go to Flat Pattern/export to DXF that everything ends up upside down.I have part where it is important that the correct side is faced upp, (brusched steel).
When i Export it to dxf, it is upside down, and the bruched facefacing down.
I'm trying to use iLogic Design Copy to copy an assembly and all its associated parts to another directory. The assembly contains content center parts. Inventor warns me that the destination file of one of the CC parts (and 18 others) will be overwritten. When I go ahead and copy anyway, the copying process stops at that specific CC part. The Design Copy Progress dialog box states there is an error copying that CC part. When I close the Design Copy Progress dialog box, Inventor crashes.
The error copying the CC part: I'm allowed to use content center parts in iLogic Design Copied stuff, right? I searched some related topics and I'm under the impression that Inventor keeps the CC parts in its own directory and shouldn't be trying to overwrite them.
I'm trying to build a VBA code in inventor 2010 to export the Center of gravity coordinates (X,Y,Z) from an inventor assembly to an excel sheet.
But I'm not able to get the iproperties for the COG from my assembly.
I am doing a tie rod the issue I have is when the length is between 2.001 and 2.250 we would drill thru all but only tap the ends .750 deep. If the part is 2.000 would would drill and tap thru in one step and not have to rotate the part in the lathe.
How do I get ilogic to understand if my number is between this 2.001 and 2.250 to lengthen the drill length parameter?Or add a mid plane cut? ( trying now code below reflects this try)
Not sure what way I want yet but I just can't seem to find a snippet or code to do this. I tried to add a list in the parameters for it to read but seems to do nothing.
If LENGTH <= "2" ThenFeature.IsActive("Thru_All") = TrueFeature.IsActive("Hole_A") = FalseFeature.IsActive("Hole_B") = FalseiProperties.Value("Project", "Description") = "RETURN ROLLER SHAFT, " & iProperties.Value("Custom", "DIAM") & " Ø S/S, TAP THRU 3/8-16, " & iProperties.Value("Custom", "LENGTH") & " LONG"ElseFeature.IsActive("Thru_All") = FalseFeature.IsActive("Hole_A") = TrueFeature.IsActive("Hole_B") = TrueiProperties.Value("Project", "Description") = "RETURN ROLLER SHAFT, " & iProperties.Value("Custom", "DIAM") & " Ø S/S, TAP BOTH ENDS 3/8-16, " & iProperties.Value("Custom", "LENGTH") & " LONG"End IfIf LENGTH = (My_List) ThenFeature.IsActive("Mid_Cut") = TrueElse Feature.IsActive("Mid_Cut") = FalseEnd If
Possible to run the 'import .xml structure' routine for an assembly BOM using either iLogic or VB?? I'm trying to replicate the Import button at the bottom of the BOM screen....
View 5 Replies View RelatedWhat I am trying to do is insert a part into an assembly file using iLogic. I basically want to mimic Inventor’s “Place” command using ilogic, maybe something like this:
oPath = ThisDoc.Path & ""
oFile = "File.ipt"
Component.Place(oPath & oFile, False)
This att. doc shows rule for exporting dxf out of drawing. It is working on one sheet just perfect. In multi sheets it save allways with same name. I want to choose from which sheet i need dxf but to be saved by sheet name or model properti name. Is that possible?
View 9 Replies View RelatedI have an external ilogic rule that creates a set of DWF drawings for all parts and subassemblies (as long as the idw files exist) within and including a main assembly.
I would like to merge all the DWF drawings of the sub assemblies and component parts into the DWF of the main assembly. Is there a method within DWFAddIn that will allow me to merge the files? Is there another way that I can merge the DWF files using the same ilogic rule (one rule to create and merge all DWF's together?)
I have closed profile "Sketch1" placed on one of the parts in Assembly.
Suggest iLogic code to create cut Extruson (Extents=All) based on the "Sketch1"
I´ve found some iLogic code to print a drawing to a PDF document. After some minor modifications it works just fine, but I would like to add some code which allows med to set PDF properties (such as "title", "author", etc.) with values from iProperties. How can I do that? Is it possible? (I'm new to iLogic).
View 6 Replies View RelatedI use simple set of iLogic rules to manage product configuration through the assembly LOD. Assembly is really simple not more then 30-50 parts. Still I manage to crush Inventor fairly often. Some days 5 and more crashes! Several times sent crash report to AutoDesk for no joy. Never got any feedback.
I am just getting an impression that Inventor does not like LOD manipulated with iLogic for some or the other reason.
I am slowly learning about ilogic, and have created parts and assemblies that are run by rules. My next question is, what exactly can ilogic do for drawings? I've looked at the wikihelp, but I am not a natural at programming and I need more than a list of functions with brief descriptions to get me started.
I'm looking for code snippets, other discussions, tips, tricks, and/or tutorials to get info what I can do with ilogic and the API that can automate parts of the drawing process.
I have been unable to find any code to sort the BOM, there are lots of snippets to sort and modify the Parts list.
How to sort the Assembly BOM?
Sort parameters:
PARTS Only
"BOM Structure"
then by
Custom Parameter "TYPE"
Then By
Part Number
Then "Renumber" starting at 1
Autodesk Product Design Suite Premium 2014 SP1 Build 222
Intel Core i7 (950@3.07GHz)
Windows 7x64 (Home) - 12GB Ram
Nvidia GeForce GTX 560 Ti (1Gig - Ver:331.65)
I made a 3D model with ilogic to control features to be suppressed or compressed. Because there are lot of features need to do so (need almost 4 to 5 min.) , when I run the rules, it came "Rule timeout" issue as pictures.
I used:
Feature.IsActive (myFeature) = status
to control the feature be suppressed or unsuppressed .