I would like to know if it is possible to use iLogic to change the Hole Type from Through to Tapped as conditions dictate. Is this even possible? I already have a backup plan but wanted to check out all possibilites before I proceed. Using Inventor 2012 SP2.
I've got a template with a set of Object defaults for an Inch drawing and a set for a Metric drawing. I've just noticed that within my metric set, if I insert a hole table with tapped holes, the font on the tapped holes doesn't match the other hole types. I'm searched around, but all the settings for the hole table style reference the same text style. (Please see the attached image.)
So is there a way to set a certain hole type to have a certain font or size within a hole table? Because if there is, I'd obviously like to remove it..... But I can't seem to figure out where the issue is.
Would like to know if it is possible to access properties of Hole features through iLogic and create my own selection dropdown for holes on a form, similar to the dropdown I was able to create by accessing materials iProperties?
Or, even better, is there a way to cause the hole feature dialogue to run during the execution of the rule for a specific hole feature? See attached for more explanation.
In ilogic it's easy to suppress features like holes, but I cannot combine iparts with Ilogic, so I try the same in VBA, but I don't know the way to do it
Is there some existing sample code like this ilogic one for VBA?:
Trying to get the tolerance on a hole to be what I want. I changed the tolerance on the hole, but my idw did not change. When I went back and looked at the tolerance on the hole, it was back to the original value. No matter what I do, it will not change to what I want it to be in the part. Here is a short video.
The dimension I am changing is .9688 and it keeps jumping back to .9686 when I go back into the hole tolerance.
Tried other values too and they would not take either...
Is there a way to get the "view type" of a view using iLogic? for example;
-detail view -section view -exploded view
Or any way to differentiate between the types of views? I'm trying to write a rule that renames all detail and section views in a drawing in Alphabetical order. A,B,C,D..
Dim propertyName1 As String = "Mortise"Dim propertyName2 As String = "Cut Length"customPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")Try prop = customPropertySet.Item(propertyName1) prop = customPropertySet.Item(propertyName2)Catch ' Assume error means not found customPropertySet.Add("", propertyName1) customPropertySet.Add("", propertyName2)End Try'output the custom iproperties and update the fileRuleParametersOutput()InventorVb.DocumentUpdate()'set iProperties 'iProperties.Value("Custom", "Mortise") = ""'update fileiLogicVb.UpdateWhenDone = True
This code creates custom iProperties if the iProperty isn't found. I'd like to add another iProperty called "Resaw" with a Yes/No property type. Is there a way of doing this the way I have things started here?
The hole table has a column named description, but in that column i want to change the defaults for the thread, i don't need the thread class, for example.
I can add or remove thread properties to the table, but i don't want to, i want to use the general Description column, which describes not only threads.
I am using ilogic in Inventor 2011 to update my iproperties when I save a .dwg file. I am having problems with some custom iProperties I have created that are of the type 'number' and are initially set to 0 (zero). After the iLogic rule has run and the user has entered a numeric value the type of the custom iproperty has changed to 'text'.
The ilogic code I am using is:
If iProperties.Value("Custom", "Nominal ID") = 0 Then iProperties.Value("Custom", "Nominal ID") = InputBox("Enter The Nominal ID (Enter 0 if no value is available)", "Nominal ID", 0) Custom_iProp_Nom_ID = iProperties.Value("Custom", "Nominal ID") End If
I am using Vault 2011 and would like to map this property to a numeric property so I can perform <= and >= searches.
How can I change the termination of an existing hole feature?
If app.ActiveDocument Is PartDocument Then Dim doc as PartDocument doc = app.ActiveDocument Dim hole as HoleFeature hole = doc.ComponentDefinition.Features.HoleFeatures(1) ...End If
Using 2013 sp1.1...After I change the hole size in the part, the callout in my hole note does not update. (crazy, I know).
If I pull a new hole note after the change, it has the correct dimension. But, if I change the hole size again, this new hole note does not update.I put the part on a new idw and it updates correctly, so somehow the idw is hosed.
I have a spreadsheet and iLogic driven mater assy to generate different iterations.
I would like to change the scale of a base view on a drawing based on a parameter in my assembly. The idea is to get iLogic to change the view using a simple If / Else statement.
This is what I tried:
If Parameter("0 Generic Assembly v2.2.iam.BP") < 1570 Then ActiveSheet.View("VIEW1").Scale = 1/8 Else ActiveSheet.View("VIEW1").Scale = 1/10 EndIf
So basically the value of "BP" parameter (excel parameter in my assy) would drive the scale of the views. But its not working. Is it actually a sensible method? Can I use in the drawing environment the excel parameters in my assembly?
This is the error message I get when the rule is run:
"Error in rule: View Scale, in document: 0 Generic Assembly v2.2.idw
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"
Also using the same thinking I use iLogic to populate the drg number field on the drawing based on an excel parameter. The rule works but does not always updates the drawing no upon the parameter change or update/rebuild commands.
I am trying to add a hole to an existing hole chart. I drop the part into a new drawing, set the ordinate "zero", and add a hole chart by selecting a few holes. When I attempt to edit the chart: click chart, right click "edit", click add hole, select new holes, right click to create, the "create" selection is greyed out and all I have to choose from is cancel. I searched the forum here but could not find a reference to this a know issue. Am I doing something wrong or is this a glitch of 2013.
We are running win7 x64 machines and this happens on both the 2013 Ultimate and Premium editions of the product.
I have had this problem intermittently for a few weeks since going to Inventor 2013 SP1.1. I have a part within an assembly and that part has holes created in it before assembling it with other parts. Now when I try and create a hole table in a drawing of the assembly I cannot select hole edges and the hole table is blank when trying to create it automatically from view selection. I originally thought it may be an alignment issue but I have since aligned everything correctly and it still persists. I can create the hole table if I import in just the part into the drawing but it will not allow me to create the table on the whole assembly.
I can also create the hole table if I use "centred pattern" and create cross hairs on all of the holes however it does not give me correct annotations for the holes as shown in attachment and I can manually change the annotations but seriously this should not be required. As shown in the screen shot it reads as A1 down to K1 instead of A1 to A10. .
Question: Is it possible to control the Hole Dimensions called out on the Hole Chart? As in controling leading/trailing zeros for main hole dim, alt home dim and tolerances? Can you combine the Main Dim with the Alt dim in a single column, separated with parentheses? (same with tolerance?)
I would like to use the hole command to place a hole in a part. When I place the hole it won't allow me to use one of the origin planes to locate the hole from. Can I only locate holes off edges?
I have an assembly that contains a part and a hole feature (the hole feature is at the assembly level). Using the api, I'm trying to get the hole location relative to the part's coordinate system in a without using the holeplacementdefinition.distance property, this way I can get the hole location regardless of the way it was defined.
I've seen snipppets of code to get the Sheet name but is there a way to set it via code? I'm thinking it might be useful to set the sheet names to the chosen sheet format (as opposed to just 'Sheet').
I'm sprucing up my drawing template...
Rule #1 is for selecting sheet format (which title block/sheet size / orientation) Rule #2 is for setting iproperty values to populate the titleblock with info. (if required) Rule #1 was based on code from S.Bixler & inventortrenches Rule#2 was based on more code taken from here.
Issue between an i-assembly and i-Logic. So, I have an assembly that includes some extra components that are not always needed and therefore an i-Logic rule takes the decision whether these will be suppressed or not.
Of course this is not a problem however it turns out that I miss some info from BOM according to the suppressed parts ...and all these makes sense following the LOD etc.
A potential solution to keep up to date the BOM while you are excluding the needless components is to create an i-Assembly.
To keep that simple I turned my current Assembly to an i-Assembly and very successfully I excluded various components and of course I included some others by adding extra ROWS.
So far So good
Now I want to apply some dimensional boundaries by using i-Logic rules. According to them I want to allow this i-assembly to jump among these different ROWS that meet the right criteria.
Very rough thoughts led me to the following code...
For example...
If Width > 600 Then iPart.ChangeROW ("..." , "...") 'Row-1' Else iPart.ChangeROW ("..." , "...") 'Row-2' End if
The Problem is that the above code works fine, for a example, in case that I will place an i-part in my assembly... However I am looking to change the row of the actual assembly that as I mentioned before I turned it to an i-assembly
To make this even more clear I want to be able to manipulate my i-assembly with i-Logic rules while this is open in Inv. I don't want to change rows while this is placed as a component or sub-assembly in an another assembly...
I am using Inventor 2012: I have a table with different part numbers. I want to create an iLogic rule to change the color of second solid body in my part for a specific part number.
This is what I did.
If iProperties.Value("Project", "Part Number") = "F22111796" Then Feature.Color("plastic")= "Gray" ElseIf iProperties.Value("Project", "Part Number") = "F22111796V" Then Feature.Color("plastic")= "Gray (Dark)" ElseIf iProperties.Value("Project", "Part Number") = "F22111796N" Then Feature.Color("plastic")= "Gray (Light)" Else Feature.Color("plastic")="Gray" End If
However it does not change the color of the second solid body when I make the part number active.
I have a sheet metal part that I converted into an iPart and I set up different rows with different sheet metal styles. What I want to do is run an iLogic code to change to a specific row which in turn would change the actual material of that sheet metal part....I've tried the snippet iPart.ChangeRow but cannot get it to run the code. I'm not sure if I'm not doing something right or what...
Before using iLogic, I created lot of iAssembly and iPart. I could change iPart factory member when I need in iAssembly.Now, I want to move everything to iLogic.
how could I change the part by iLogic code?
For example:
I generated "Part1.ipt" and "Part2.ipt",...... (I have hundred of member)
In my assembly, sometimes, I need use Part1.ipt, sometimes I need use Part2.ipt.
Which is the iLogic Code I should to use?
Inventor 2009, WIN XP. Autodesk Inventor Professional 2013 (64 Bit) SP2 Windows 7 Professional Service Pack 1 Intel(R) Xeon(R) CPU E5645 12.0 GB Memory
I got this code earlier from Curtis_Waguespack, and i would like to add a setting... When i run this rule it Derives the assembly, but LOD is set to Master, i would like it to be set to my own (Configurator) LOD...
I don't seem to be able to find anything in this code, that defines LOD...
So far im doing ok with the standard ilogic code, but when it´s API or VBA code im lost.. which leads me to this.. i've been searching the forum back and forth to find a code that performs the feature "Shrinkwrap", and somehow everything i have found so far does not work... even the code example in Inventors help menu under programming, Therefore im trying to solve this with Curtis's code as staring point..
'set a reference to the assembly component definintion.'this assumes an assembly document is open.Dim oAsmCompDef As AssemblyComponentDefinitionoAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition 'define the path and file nameDim sPathandName As StringsPathandName = ThisDoc.PathAndFileName(False)