AutoCAD Inventor :: ILogic If Statement Condition Being Ignored?
May 16, 2013
I have the following code to clean up iProperties in idw files.
If ThisDoc.Document.documenttype=12292 Thendoc = ThisDrawing.ModelDocumentiProperties.Value("Project", "Revision Number") = doc.PropertySets.Item(1).Item("Revision Number").ValueiProperties.Value("Project", "Part Number")= ""iProperties.Value("Project", "Description")= ""iProperties.Value("Summary", "Title")=""iProperties.Value("Summary", "Subject")=""iProperties.Value("Summary", "Author")=""iProperties.Value("Project".
[code]....
For some reason, when this code runs, it always trys to execute the doc=ThisDrawing.ModelDocument, regardless of whether or not the IF statement condition is true. I am running Inventor 2012, SP2
View 2 Replies
ADVERTISEMENT
Feb 28, 2013
I am using Civil3D 2011 and have a need to create an assembly that will take one of three options, depending on the tie-in condition points (e.g., the end of a link, not the beginning). As far as I can tell, Civil3D can discriminate which sub-assembly to choose based on conditions at the link starting point (e.g., if the start point is 2' of fill, it will select sub-assembly A; if the start point is 2' of cut, it will use sub-assembly B, etc.). However, I have a condition where the cut/fill conditions at the assembly start point have little to do with what I want the subsequen sub-assembly to do.
For simplicity's sake, you can imagine my "existing conditions" (2D) section as a flat-bottomed, U-shape with vertical sides (i.e., a trench); it's bottom width can vary.For the time-being, let us consider one side of an assembly in a fill condition only. Imagine that I want to satisfy design constraints but limiting fill quantities is a second priority; in instances when the bottom width is small, I would want the assembly to catch the existing trench with a 2:1 sideslope fill (or in Civil3D speak, a cut, because it would be upwards), so my finished surface is a now a V with the vertical faces above it. That works fine and dandy for a "trench" a few feet wide; however, imagine if that trench were 100s of feet wide - a 2:1 side slope would be a lot of fill for a ditch. So rather, I would want to "embank" the ditch - 2:1 side slope up (cut) to define my ditch XS, a horizontal link over to "embank" it, and then a 2:1 side slope down (fill) to catch the flat-bottom of my trench. So as you see, both situations have the same "Cut/Fill" condition (starting point) but drastically different end results.
View 9 Replies
View Related
Aug 14, 2013
I trying create simply macro for my work. It is mass rename for *.ipt files and their iProperty.And i need create condition "IF" for this (example 2 files):
4-1903-01 Pachole.ipt -> iProperties-Summary-Subject = nothing
4-1903-02-01 Dachole 2.ipt -> iProperties-Summary-Subject = "4-1903-02" (first 9 symbols)
How to do it? Maybe find first symbol "space"
Public Sub UpdateDocs()'JDK 2013' Include REF to Microsoft Scripting Runtime Dim oApp As Application Set oApp = ThisApplication Dim oDoc As PartDocument Dim oPropSet As PropertySet Dim FSO As New Scripting.FileSystemObject Dim oFld As Scripting.Folder Dim oFile As Scripting.File Dim Path As String Dim sTitle As String.
[code]....
View 1 Replies
View Related
Oct 11, 2011
I'm trying to write my first VBA program for Inventor with very little programming experience. I would like to create a userform which displays the materials list within a combobox.
The problem I have is that I would like the userform to remain open no matter which type of file is active. I would like the combobox to display the material list and current material when in a Part file and display N/A when in Assembly file.
View 3 Replies
View Related
Jan 18, 2012
I have to choose 1 of three views in a drawing using a range of values like:
if ..........<10 then
ActiveSheet.View("VIEW1").View.Suppressed=False
else
ActiveSheet.View("VIEW1").View.Suppressed=true
[Code]....
The syntax that is in red upstairs gives me a error... What is the proper syntax to do this condition involving a range between two values???
Autodesk Factory Design Suite Ultimate 2014
Autodesk Simulation Mechanical
Autodesk Simulation CFD
Windows 7
View 4 Replies
View Related
Aug 19, 2013
how can I close an iLogic Form from either an iLogic Rule, or a VBA Rule (VBA is the Preferred method)?
View 5 Replies
View Related
Jul 18, 2013
Is it possible to add an if then statement to the parameters manager in dynamic blocks in Autocad 2014. For example, in the image below is it possible to put in A1... 'IF Dim1= 0, display 0, else (Dim1-79-50)'.
View 1 Replies
View Related
Aug 17, 2010
How I can put the above mentioned Sub-Assemblies in a CUT condition? They all default to a Fill condition (Attachment Point at Top of Wall). I need it to have the attachment point at the Bottom of wall. I cannot seem to find where to do this?
View 5 Replies
View Related
Apr 19, 2012
Is it possible to write “If statement” in the table?
For example, I wanted to have the following if statement:
If b3>180º, d3 = b3-180º
If b3<180º, d3 = b3 +180º
Is this possible in the AutoCAD the same way we do it in excel?
Software: AutoCAD 2014, AutoCAD C3D, AutoCAD M3D, Revit
Windows 7 (Ultimate 64 bits),
Firefox 20.0,
Kaspersky 2013.
View 6 Replies
View Related
Dec 23, 2013
how to design a group in a query condition in AutoCAD 2011 MAp 3D I have
Property: LAYER = CP*
AND (Data: CIRCUIT.CIRCUIT = BRN22
OR Data: CIRCUIT.CIRCUIT = BRN21)
I woudl like to get this into vb.net?
also, in vb.net when creating a new data condition....do I need to use datacondition.Table and Datacondition.Column? Im unsure what these mean?
View 1 Replies
View Related
Jun 5, 2013
I have an open cut area with 8 meter height and a bench of 5 meter for the first 3 berm, on the 4th berm the bench will become 10 meter. Is there any way to build it in assembly? I attached 2 drawings to clarify the problem.
View 1 Replies
View Related
Apr 8, 2012
I like to create a daylight assembly with following criterias
Fill/cut Condition
1. Target to surface 2.5% slope
2. If the surface is not met within 19 m from centreline, then till 19 m 2.5% slope and 33% slope afterwards till it hit the surface.
Civil3D 2012
View 2 Replies
View Related
Aug 19, 2013
I created a block, that uses the Y coordinate of the block and returns it's location in a field.
I would like to be able to indicate weather the value is negative or positive. If Y coordinate is less then 0, then the field indicates "-" in front of the value. But if the Y coordinate is positive, I couldn't find a way to place "+"symbol in front.
Is there any way I could introduce a conditional statement saying: if Y>0 then add "+" in front?
View 9 Replies
View Related
Feb 2, 2013
I am trying to create a custom subassembly using SAC 2012 that will place a 1' deep ditch at the bottom of the slope in a fill condition. The trouble I am having is how to hold a consant 1' depth on the backslope and vary the foreslope since the daylight offset and elevation is variable depending on the slope of the existing ground. I need the attachment point to be the edge of the shoulder so it seems like a loop that varies the foreslope length would be required but loops are not allowed. I will also have the option to target a profile but I also need the ability to hold a constant ditch depth.
How to model this condition.
View 9 Replies
View Related
Jan 31, 2013
Does the 2013 subassembly composer include a way to include a condition based on LANE-OUTSIDE-SLOPE?
The figure below indicates the type of condition I would like to include (red arrows).
View 5 Replies
View Related
Aug 26, 2013
how to create actions using the new condition statements - tried google nothing step by step with examples.
I would like to crop an image to suit then have it resize vertically to a set size then stroke it with a colour of your choice (would stop and ask you to pick a colour from the image) then save it. Before conditions I made one but if the image changes the ratio of width to height during the crop it fails. Also of course before conditions it uses the colour for the stroke that I chose when making the the original action. BTW I don't have a document portrait option, document square and document horizontal only.
View 1 Replies
View Related
Jan 20, 2013
I'm having a problem with IF ELSE code use with a mouse click. What I want each time a user "clicks" i want to execute a particular block of code, up to 3 clicks, then nothing. I've tried local and global click counter var but can't seem to get past the first "if". This is what I have now (I'm using console.log() to keep track.
In comp ready i create a global var ...
// insert code to be run when the composition is fully loaded heresym.getComposition().getStage().setVariable('clickcnt', 1); //set counter to 1
var i = sym.getComposition().getStage().getVariable('clickcnt');
console.log ("Counter is starting at "+i);
on the stage i create a "click" event..
// insert code for mouse click herevar i = (sym.getComposition().getStage().getVariable('clickcnt'); if (i=1){ console.log("counter is = "+i); //do some code sym.getComposition().getStage().setVariable('clickcnt', 2); //set counter to 2 } else if (i=2){ console.log("counter is = "+i); //do some code sym.getComposition().getStage().setVariable('clickcnt', 3); //set counter to 3 } else if (i=3){ console.log("counter is = "+i); //do some code sym.getComposition().getStage().setVariable('clickcnt', 4); //set counter to 4 taking it out of range sym.play(100); //play the timeline animation } else { //
I'm using this to negate any further clicks. I'm sure there's a proper way to do this. I just don't know it. sym.stop(1000); console.log("end"); };I When I run this It never gets passed the first if, It's like the "clickcnt" var is not getting updated or read properly.
View 5 Replies
View Related
May 27, 2013
I'd like to use the opacity of a symbol in an if-statement. How to ask for it?
View 5 Replies
View Related
Jan 14, 2013
LR4.3
New catalogue created 2nd Jan 2013 - less than 300 images
Windows 7 Home Premium 64-bit, fully updated
Lenovo G770 6GB RAM 500GB HDD (partitioned C: & D: LR executables + catalogue on C: - 200GB free; images on D: - 160GB free)
Olympus ORF (from E-P2) imported as DNG
30 image files imported
One user preset run with import.
all imports selected in library then autotone applied in quick develop
change to develop module
start to edit - crop -
error: "An internal error has occurred! DB statement finalized twice "
Now can change module, click on folders etc, but no images are displayed.
No disk activity
LR displays "Loading ... " in centre pane
Closed LR without other errors displayed.
Now cannot restart LR - click on icon and brief hourglass, then nothing.
task manager shows two instanced of lightrrom.exe as running, one at 830K and another at 2.3K
Kill these tasks & restart lightroom. Catalogue does not show most recent import.
Close lightroom - still shows "phantom" lightroom.exe in task manager.
View 2 Replies
View Related
Jan 15, 2013
is there a way to make a if and conditional statement formula in a family with 3 tests?
For example,
Behind Furniture, Biscuit, Masonry Wall, Hard Ceiling are all yes/no parameters
if(and(Behind Furniture, Biscuit, Hard Ceiling), 0' 0 5/16", if(Behind Furniture, 0' 0 11/64", if(Biscuit, 0' 0 11/64", 0' 0 27/256", if(Masonry Wall, 0' 0 11/64", 0' 0 27/256"))))
what is wrond with my formula?
I am trying to change a dimension based on what yes/no parameters are checked. It keeps telling me that its "a bad if statement format". It works fine for the first teo dimension tests but when I add this last one I get the error. I need the 3rd dimension to check against 3 yes/no parameters all being = yes before moving on to the next check.
View 9 Replies
View Related
Jun 4, 2013
Is it possible to use a load statement in a profile to automatically load/unload a cuix?
View 7 Replies
View Related
Jan 16, 2013
Is it possible to read the current wall thickness of a door's host and use that dimension in a conditional statement to locate the frame's setback?
If the wall is deeper than the frame I want the door flush with the wall, if the frame is deeper than the wall, I want the door centered.
I set up a Wall Width paramenter in my door family but I keep getting the "Inconsistent units" error message.
View 3 Replies
View Related
Nov 5, 2013
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.
View 3 Replies
View Related
Nov 13, 2013
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
View 2 Replies
View Related
Mar 8, 2011
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 Related
Jan 16, 2013
What 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)
View 1 Replies
View Related
Jun 20, 2013
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 Related
Aug 28, 2013
I 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?)
View 3 Replies
View Related
Aug 9, 2012
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"
View 6 Replies
View Related
Jan 9, 2013
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 Related
Jul 12, 2013
I 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.
View 5 Replies
View Related