AutoCAD Inventor :: Preserve Functions In IProperties When Accessing With VBA Script
Dec 3, 2012
I made a simple dialog to access some of the iproperties. This is quite handy when working on a drawing of a part, but there is one flaw with this script. If the part's description has a function referencing the parts dimensions for instance, when my script gets the description it gets the plain text and not the formula. Meaning if the part's description is "=<d0> X <d1> X <d2>" and appears as "1 X 2 X 3" the script will get "1 X 2 X 3" and when it resaves the description it will over write the formula with plain text.
Is it possible to get the formula so my script could display that for editing instead of the plain text?
Below is a part of the code I'm using and it's the standard code I've seen for retreiving ipropterties.
Dim invDoc As Document Set invDoc = ThisApplication.Documents.ItemByName(GetToken(PartList.Value, 3, Chr(1))) Dim invDesignInfo As PropertySet Set invDesignInfo = invDoc.PropertySets.Item("Design Tracking Properties") Dim invProperty(1 To 4) As Property Set invProperty(1) = invDesignInfo.Item("Part Number") partnumber.Value = invProperty(1).Value Set invProperty(2) = invDesignInfo.Item("Description") description.Value = invProperty(2).Value
View 1 Replies
ADVERTISEMENT
Sep 19, 2013
I was looking for some iLogic Code for Inventor 2013 that would cycle through all the parts in an assembly grabbing the quantity of each part and setting it equal to the custom property "Qty" of each part.
Having a little trouble creating the for each loop and setting reference to each part without referencing each part by specific name.
View 6 Replies
View Related
Nov 15, 2011
We have written a VB6 program for non-Inventor users that uses the Autodesk Inventor Object Library from an install of the Inventor Viewer 2011-2012. The program collects drawing sets from a VaultMirror folder exported from the actual Inventor vault. In addition, the program exports assembly parts to a formatted Excel file for purchasing.
We thought that it worked fine but, have recently found an issue: the program reads and exports ALL items referenced in an assembly, not just items in the parts list. For a particular assembly that I am using to test with, there are seven items in the parts list but, 23 parts referenced in total in the assembly. So, we get an Excel export with 23 + line items and when plotting to pdf, get 23 pdf files instead of the seven that should be created.
We are using the ApprenticeServerComponent to open the file objects but, I can't find a parts list. I have reviewed a number of posted examples of accesing parts lists and opening ApprenticeServerDrawingDocument objects but, nothing seems to work. It is like I don't have access to all of the object types needed to make it happen.
Should I be trying to open an iam or idw to access the parts list?
Are there any very basic code examples available of accessing a parts list?
View 1 Replies
View Related
Jul 13, 2012
How we can access the part parameters after hitting create iAssembly. do I need to make i parts first and then bring them to an assembly and make an iAssembly??
View 5 Replies
View Related
Feb 3, 2011
iLogic has the capabilities to access the physical properties of part files such as mass / area / volume etc. ilogic syntax to read the inertial properties of the part file such as Global Ixx / Iyy / Izz??
I can find it in the API help, but i don't really want to write it as separate code, just want to simply access it through iLogic interface.
Dell Precision M6400 - C2D 2.66 / 8gb / Quadro FX3700M / Win 7 Pro x64
View 4 Replies
View Related
Nov 27, 2012
I'm currently creating a program to replace all fasteners in an assembly with there Metric / Imperial opposites. My program works and I've created a log file for any issues that do come up.
My question now is:
Is there any way to manipulate bolted connections through the API? Or is this not supported yet?
I cannot seem to find anything to do with them. It's strange though as my program creates an error log for the Lock Washers in the Bolted Connection (which it was struggling with previously anyways), but shows the other fasteners as being successful.
View 4 Replies
View Related
Aug 22, 2012
I'm crating a macro wich would allow me to select multiple parts in an assembly and then calculate the length of each part. The parts are tubes wich are made of a sinlge sweep.
I started from the example truesweeplength, and built from there.
Now my problem is accessing the sweepfeature from the assembly.
In the part enviroment i use this:
Dim oDoc As PartDocument
Dim oDef As PartComponentDefinition
Dim osweepcount As Long
Set oDoc = ThisApplication.ActiveDocument
Set oDef = oDoc.ComponentDefinition
osweepcount = oDef.Features.SweepFeatures.Count
The sweepcount is simply to check how many sweep features are in the part.
This works fine in part level.Now from assembly level I first create an obecjtcollection from all the parts I selected
Set oOccurrences = ThisApplication.TransientObjects.CreateObjectCollection
Then I try to acces the first occurence
oDoc.SelectSet.Item(1)
But then I'm stuck. I cant find the way to acess the features of the selected part.
View 6 Replies
View Related
Oct 28, 2013
I'm trying to access a paramter thats in a sub-assemby 3 sub-assemby deep, is this possible?
I have tried a few thigns incluiding this, but it doesn't work.
Parameter(MakePath("MegaStalls:1", MakePath("Stall_1", MakePath("Pilaster:1", "xPilaster:1"))), "pilasterHeight")
View 6 Replies
View Related
Dec 12, 2013
I have installed Inventor 2014 and Revit 2014 on to Windows 8.1 64 Bit.The install went fine.
The only problem I have struck is that for instant if I create a new Assembly and want to open the Content Center from Assemble - Place - Place from Content Center. Nothing happens when I go through this path way, there's no error, you know it's trying as the harddrive light is flashing away rapidly for a few minutes each time you ask for it to open.
What I have tired so far is to install service pack 1 and update 1 to service pack 1, neither have made a difference.
View 6 Replies
View Related
Mar 25, 2013
I have been using this software for a few months now, and I continue to have crashing issues. The issues, however related, are not consistent. I tend to have issues when using more complex applications of the software such as crashes when performing a breakout view, freezing and then many times crashing when manipulating a part within an assembly drawing, and several other similar issues. I have received an update SP1.1 (176) and installed it. This update states it contains a fix for issues of crashing due to excessive memory consumption.
I have 6GB of RAM, nVidia Quadro FX 3800 1GB graphics card, Intel Core i7 920 2.66GHz processor, and updated drivers...
View 9 Replies
View Related
May 6, 2013
In my Parameter equation dialog box: "cos(.5)" is red"(.5)" is black.
Does Excel need to be installed for Trigonometric functions (I don't have Excel)?
View 2 Replies
View Related
Jul 3, 2012
Are there any prebuild functions for Calculus in ilogic.
View 2 Replies
View Related
Apr 10, 2013
I want to make popup the i properties windows to fill or change in 2 ways:
» when creating a new ipt, iam and idw
» just before saving all 3
the properties I want to validate are
- the title not filled
- if there is more than one line filled in comments
View 1 Replies
View Related
Mar 7, 2013
I am opening, using VBA, the iProperties "Pop Up" box, using the following code....
ThisApplication.CommandManager.ControlDefinitions.Item("AppiPropertiesWrapperCmd").Execute
If it is possible to open the iProperties "Pop Up" box at a specific Tab, for example, "Physical" or "Status" etc?
View 1 Replies
View Related
Dec 5, 2012
Is there any way to add an "iProperties" item to the context menu in the drawing environment, so that I can select a part on the drawing and access its iProperties, instead of having to "Open, edit iProp, Close," for each individual part? - Using Autodesk Inventor Professional 2012
View 2 Replies
View Related
Jul 3, 2012
Any way of having 2 files with different file name but identical designs what automatic updates the other one?
I need the same valve design with different materials, stock number and part names but I would like to make sure that both files are always updated to latest rev. Without having to remember to do it my self every time.
We are using vault?
View 4 Replies
View Related
Jul 9, 2012
Is it possible to create a new TAB in the standard iProperties dialogue box for Inventor Models and Drawings? I want a completely new TAB to hold unique company information fields without having to create Custom Property fields.
View 2 Replies
View Related
Aug 26, 2013
While in assembly, i would like to select a subpart and be able to clear or delete the value of ex description without opening the part file.
I can delete properties in custom prop but i cant do it in description....
I've use design tracking properties but to no avail....
View 3 Replies
View Related
Dec 20, 2013
In the past we filled in our changes, we did on the part, in the iProperties of the IDW. In the IDW we use some Custom iProperties for this. That's not usefull because you want this data in the 3D-model. Now I have written some code to automate this, which works really great. This code works in the IPT as well as the IDW. But what I want to achieve is: When my IPT is the active document, I want to read out the iProperties from the IDW to check if there is already filled some of these properties, because I have to deal with 'old' documents as well.
So my basis question is: How can I read out iProperties from an IDW into the IPT. I have found lots of solutions which go the opposite direction, IPT -> IDW. I want IDW -> IPT.
View 9 Replies
View Related
Jul 26, 2010
I want to get out the Area in Physical Tab in i Properties, after that, I will show it out in drawing by add general notes
This is my program:
[code]
.....................
Dim oBlockPart As PartDocument
oBlockPart = mApp.ActiveEditDocument
..................
Dim oGeneralNotes As GeneralNotes
View 7 Replies
View Related
Aug 9, 2012
I need to add a "Gauge" value to show up in the iProperties dialog box under the Project tab, but I don't know how or if I can.
View 9 Replies
View Related
Aug 15, 2012
I am now looking to work with custom iProperties that will populate our company's new BOM standard. I have not done much with regards to customizing a BOM (I've always used the generic fields). Now my boss has come to me and wants to use the following headings for our BOM....
REF ID, QTY. , DESCRIPTION, SHAPE, SIZE, LENGTH, MASS, TOTAL LENGTH, TOTAL MASS, COMMENTS, REF. DWG.
REV., REV. DATE
While I understand some of these fields will require the user to manually type information in (Comments and Ref. Dwg.) The others, from my understanding, can come straight from iProperties or Parameters. I am running INV Pro 2013.
View 1 Replies
View Related
Apr 7, 2009
i would like to be able to make a change in iProperties ( part #, description, stock number), and then automate/sync that change to the .idw of that part/project after the .idw is created.
is this possible? do i just need to fill out the iProperties BEFORE i make the .idw,
I really hope this is possible, we are going back and reorganizing all of our previous work and putting everything in vault now.
View 9 Replies
View Related
Jan 6, 2014
Sometimes I change the dimensions of a material I use but then I have to open Iproperties and change the description by hand. This can create problems as you can understand especially when I forget to update the Iproperties.
Then I had the thought to automate it. Lets take a steel bar as example. I have thickness and width as parameter, both are exported and available under IProperties/Custom. But they show as 200 mm and 10 mm. I would like to loose the units. I tried also UL but then it reads 200 ul and 10 ul.
What I like to get are just the numbers, no units. I like to use it to create this "steel bar 200x10" where the 200 and the 10 are linked to the Parameter and will change when I change the dimensions av the steel bar.
View 9 Replies
View Related
Dec 22, 2012
How can I get the "Location" iProperty using Inventors VBA?
Please see the attached picture!
I am using the following code to get other iProperties, thus.....
Set oStockNumberProperty = oCompDef.Document.PropertySets.Item("Design Tracking Properties").Item("Stock Number")
StockNumber = Trim(oStockNumberProperty.Value)
This works OK.
View 3 Replies
View Related
Jun 17, 2011
Is it possible to use a user selectable browser for all related functions?
I'd like to see the possibilty to select with which webbrowser Inventor interacts.
Currently the wikihelp opens in my default browser (Google Chrome), but the help function and subscription links open in Internet Explorer.
View 3 Replies
View Related
Sep 2, 2013
ilogic is calculating tan/sin/cos/aTan/aCos/aSin incorrectly. E.g.
MessageBox.Show(Atan(35))
Answer = 0.4738... when it should be 0.7002....
View 5 Replies
View Related
Apr 10, 2013
I have an iLogic rule in which I'm trying to set three user parameters for the gage of each leg of a steel angle. I want Inventor to set the gage based on the length of each leg. Here's the table I referenced for gages: [URL].
In my code, I have a sub called DetermineGage which takes the leg length, whether it's the short leg or the long leg, and determines the gages that should belong to that leg. Inside of that sub it calls on a sub called ApplyGage which then applies the determined gage to the rule's gage variables. The main sub then grabs those variables and applies those values to the actual user parameters.... In theory.
The rule executes ok with no errors, but doesn't change the value of the user parameters; they're always "0". As best I can tell, the "oGage" variables I used in the rule don't even get assigned the correct value, which makes me think the DetermineGage and ApplyGage subs can't even access the oLegLength or oGage parameters to read or set them. I don't want to use global parameters because I've heard that can make programs very unstable over time and is just bad practice. How can I make these variables accessible to all subs IN THIS RULE, no more no less?
Sub Main()Dim oLegShort As Double = Min(G_W,G_H)Dim oLegLong As Double = Max(G_W,G_H)Dim oLegLength As DoubleDim oGage As DoubleDim oGage1 As DoubleDim oGage2 As Double'Short Leg:oLegLength = oLegShort'Call DetermineGages sub to set oGage variables:DetermineGages()On Error Resume Next'If gage parameter does not equal true gage, set it equal:If Parameter("ShortLegGage") <> oGage ThenParameter("ShortLegGage") = oGageEnd If'Assume error means gage parameter does not exits. Create and set equal to true gage:If Err.Number <> 0
[code]...
View 9 Replies
View Related
Oct 4, 2011
I am working on creating a new part file Template. Any useful and productive iLogic functions those are already available.
A while ago, I had seen one that would simply triger when part was checked in or saved. It would check if the material feild was utilzed or forgotten at Default.
share if there are any good iLogic functions that we might benefit from.
C1
Inventor Professional 2013
Vault Collaboration 2013
View 2 Replies
View Related
Mar 22, 2013
how the internals of Inventor / iLogic are working.
We have multiple instances of Inventor running on a 12 core workstation so we can push configurations through concurrently - each Inventor instance is assigned its own processor affinity and each instance has its own project which points to seperate directories of Inventor models.
Everything seems to work OK when there are up to 5/6 working concurrently, but as soon as there are more than 6 the iLogic functions seem to grind to a halt - note that the rules are external rules.
For example, this function took 11 seconds to complete when there were 10 concurrent orders processing. :
Parameter("BLANK", "EDGE_FRT_ACTIVE") = "YES"
Similarly these functions took 11 seconds in total to complete :
iProperties.Value("Custom", "M1110900_P1PO") = iProperties.Value("Custom", "BLANK_GDIM") - iProperties.Value("Custom", "PANEL_GDIM")iProperties.Value("Custom", "M1110900_P2PO") = iProperties.Value("Custom", "BLANK_XGDIM") - iProperties.Value("Custom", "PANEL_XGDIM")iProperties.Value("Custom", "M1110900_P1OR") = 1iProperties.Value("Custom", "M1110900_P2OR") = 0
When I run these with less that 6 concurrent Inventor processes, they're are almost instant.
I just don't know where the bottleneck is. I've ruled out :
- Processor (each core never reaches above around 60%)
- RAM (we've got 48GB of RAM, with about 15GB free at worst)
- Disk (disk IO is busy, but it doesn't look like it's the bottleneck)
- Graphics (Inventor is in silent mode, with no UI, so graphics activity is minimal)
From the tests I've done it seems to be the iLogic functions that are the bottleneck. My next port of call is to change the iLogic functions to actual API calls, but I suspect I'll get the same results.
So, my questions :
Is Inventor queing these iLogic API calls somehow (note we're creating a unique instance of the Inventor.Application COM object for each processing thread) ?
Is there an issue with using external rules with nultiple instances?
Dell Precision R5500, Intel Xeon X5690 3.47GHz (x2)
48GB RAM
Inventor 2013 (PDS Premium)
64bit Windows 7 SP1
View 4 Replies
View Related
Sep 6, 2013
I used to have an A1 printed sheet of all of the ilogic commands, functions, syntax or whatever you call them. It was all nicely grouped and colour coded etc
Unfortunately I have since moved jobs and lost this and neither me or google can find this again, any copy or link? it may have been a pdf or excel format.
View 3 Replies
View Related