ILogic code ,I have had some code done to isolate selected parts in a assembly file that has a specific custom property filled in i.e. : DESC2.It then creates view reps and locks down giving the rep name the same name as part.
What I am after is some code that will place these isolated view reps as views on my dwg that the assembly resides in.With the functionality of picking face to show plan view of parts.
I've had this issue now for quite a while. Seems to only happen with wires that are made in the Cable & Harness module. And the odd part is that not all wires do this and not all View Rep/Detail views do this.
Regardless of wether I have a wire visible or not in a locked View Rep it still shows up in the Detail View on the .idw. And yes, I have the 'associative' check box checked.
I've unchecked the check box, nothing. Rechecked the box, nothing. Updated the views individually, nothing.
I have a part in which one of the folds needs to be done at assembly and not during manufacturing of the other bends.
Is there a way I can show this so that the manufacturing print sees exactly what they need to do and nothing more but then on the unit assembly the assemblers see that the unfolded tab needs to be folded down?
I have an issue with Shrinkwrap/Derive when using a Positional Rep.Open the derived part and try to change it to the "work" positional rep.Everything appears to work fine in the "master" rep.I have this problem in a few of my assemblies and was able to track it down to the positional rep usage in the derived part.
When creating positional reps in Inventor 2012 SP1 it rounds them to a 3 place decimal. So If I want the constraint to be at 1.1875 it rounds it to 1.188. Is there anyway to change this to 4 place decimal?
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..
Is there Any code out there that will allow user to select part file then isolate and create view rep of that part with name of view rep the same as part.
The reason is we have lots of reps that isolate various components and this is very time consuming, I have had a look if there is Any customization because this would be a good user tool,also could work very well on assembly.
I have been looking around but have not been able to find examples of how (If I can) set the model views via iLogic.
What I am trying to do is to have the view change from "Master" to the view I have created for each part, so when I go to create drawing all I have to select the right view and the part changes to match view.
it is a local rule in an idw file that has been saved with an ipt file of the same name saved in the same directory. Now I get the most useless error message ever devised by manking
"The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"
I am using a number of sketches in a skeleton to control multiple solutions.
I am using case statements that apply values to my variables and create my solutions which is working fine however,
for clarity of what is being used in a given solution I want to turn on/off the sketches in my code. I have created a set of model views that when active properly turn off the visibability of the appropreate sketch.
While model view is among the things that can be selected for use in the code, so far as I can tell, I can not find a function that will allow me to set a view true so that it activates the view and my sketches turn off.
Like the title says I am looking to place views (and dimensions) on drawings using ilogic. I am new to both inventor and ilogic, most of my training came in SolidWorks. It needs to pull the part from an ipart that pulls the information from an excel file.
Is there code for changing the color (or other properties) of the visible edges of a component in a drawing view, the same way I can do it manually by right-clicking a component and choosing Properties?
I wrote this rule to change the color of each individual drawing curve:
Edit: Ignore the "<!". It's the only way I could get the iLogic code to successfully post in the message
Spoiler (Highlight to read)<!Dim drawViews AsDrawingView For Each drawViews In ThisApplication.ActiveDocument.ActiveSheet.DrawingViews occ3 = drawViews.ReferencedDocumentDescriptor.ReferencedDocument.ComponentDefinition.Occurrences.ItemByName("GF_Plenum:1") Dim newColor3 As Color newColor3 = ThisApplication.TransientObjects.CreateColor(0,255,255)
I have a iLogic question about finding out if a View exits..
Lets say I have a drawing that I want to read the scale of a view.. All the snippets I have found is pointing to the name of the view like "VIEW1". But if I have deleted the first view I created it will give me an error..
So, is there ant possibility to check if the "VIEW1" exits without getting an error?
I am trying to rewrite Curtis Waguespack's ilogic code to modify drawing view labels from this post http: [URL]...
The completed label should appear like this
<Description> - Mk <Part Number> Est Unit Mass = X kg (Scale 1:1)
At this point I have 2 problems
1. I want to add the physical mass to the second line and would prefer to use the calculated physcial property rather than the a custom iproperty. If editing the view label, it would the property access under physcial properties.
2. I want to rewrite the code so it is selective or per view - in otherwords, I only want it to modify a single view I select once the code is run. At this point I know I need to remove the For loop but I dont have a clue as to how to make it selective.
'start of ilogic codeDim oDoc As DrawingDocument: oDoc = ThisDoc.DocumentoModel = ThisDoc.ModelDocumentDim oSheets As SheetsDim oSheet As SheetDim oViews As DrawingViewsDim oView As DrawingViewoSheets = oDoc.SheetsFor Each oSheet In oSheetsoViews = oSheet.DrawingViews For Each oView In oViews oView.ShowLabel = True
when open an assembly not all parts are shown. To be able to see entire assymbly need to change View representation to Master manually. How to achieve this in Ilogic?
is there any way using iLogic or other method to automatically control the size of the 'break' in a drawing view? I have built a model which uses iLogic to control virtually everything, however the large variations in the length of the product mean that there are some interesting results when it comes to the broken drawing views updating.
it would be nice to locate the break at the absolute center of the view and then size it as a percentage of the view size along one axis or perhaps according to some other length based rule.
I have received a great solution from Bobvdd allowing ilogic control of the view rep in a part file (not an assembly file). The code below works brilliantly when the part file is the active document. However when the part is placed in an assembly and the ilogic is run with the assembly active, the code produces no result. How to modify the top 6 lines of code?
Dim oApp As Inventor.Application oApp = ThisApplication Dim oDoc As Document
I am trying to piece together some code for an ilogic rule. This rule should look for a drawing view that is a flat pattern, if it finds one it should change the object layer to our "CNC" layer.
I'm trying to do this with iLogic, and i'm not getting anywhere. What I need, is to be able get to the iProperties of an associated model that is referenced into a drawing file. I want to make it easier to update the iProperties from the drawing file, without having to open the model file.
Factory Design Suite Ultimate 2012 AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012
Is there a way to convert an Inventor 2012 view scale from "0.5" to "1:2" or similar within an iLogic rule? I can extract the main view scale and plug it into a variable but the format isn't correct for the drawings I'm creating.
Currently have an iLogic rule in my drawing template that base on user input brings up the Drawing View dialog box (as though you click on base view). I want to know if there is some coding I can do to control or handle what happens if the user clicks the cancel command inside this dialog box. Possibly show a message box. Or even run another rule after the cancel button has been clicked?