AutoCAD Inventor :: ILogic - Defining Variable In Name

Nov 16, 2011

I'm an Inventor 2011 user and I'm writing a Ilogic script to update an assembly. For this I want to use a variable in a name.

For example d1 till d10 will be given the value 25.

Is it possible to define "d" combined with a variable "n" . The script should be something like this:

n=1

for n<11

dn=25

n=n+1

end

View 3 Replies


ADVERTISEMENT

AutoCAD Inventor :: Pass Variable From VBA To ILogic Rule?

Sep 20, 2011

We are using Inventor 2011.

I have found a rouind about way to display document thumbnails in VBA in 64 bit windows 7 inventor.

The only piece of the puzzle I am missing is for a way to push a document object or a document file name into an iLogic Rule from VBA. 

Below is a 64 bit thumbnail solution for VBA sans the input.

Essentially I am launching an iLogic Rule from VBA that pushes an inventor document object into a VB.NET dll.

The dll converts the iPictureDisp into a VB.NET image object, reduces the size then converts it into a byte array.

The byte array is passed back to VBA through the same iLogic Rule.

Once the byte array is received it is converted back into an iPictureDisp object.

' ----------------------------------------

' --- VBA Project Form Code ---

' ----------------------------------------
Option Explicit
Private Sub Command1_Click()
End Sub

' -------------------------------------------

' --- VBA Project Module Code ---

' -------------------------------------------
Option Explicit
Public Sub SetPic(ByRef bBuffer() As Byte)
Set UserForm1.Pic.Picture = PictureFromRes(bBuffer)
End Sub

[Code]....

View 9 Replies View Related

AutoCAD Inventor :: ILogic / Use Same Variable In Multiple Subs / Functions?

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

AutoCAD Inventor :: Get Environment Variable To Run External ILogic Rule

Sep 17, 2012

I tried to read an environment with iLogic and to combine it with an external rule name and to pass the whole path over to iLogicVB.RunExternalRule.

StrPath = Environment.GetEnvironmentVariable("ILOGIC_DIR")ilogic_rule = "IPT__01_New_Document_EXT.iLogicVb"rule = StrPath & ilogic_rule'MessageBox.Show(rule, "iLogic Rule to execute")iLogicVb.RunExternalRule(rule)

The message box shows the correct path, but I allways receive a error massage:

'GetEnvironmentVariable' is not a member of 'Inventor.Environment'

View 3 Replies View Related

Illustrator :: JavaScript Save As PDF - Defining Enumerated Values As Variable

May 17, 2013

how I can use a variable as the target for a Save as PDF option in Illustrator javascript. the variables work fine where there is no enumerated value for the property i.e. opts.generateThumbnails but I can figure out how to get it working opts.compatibility or other properties with enumerated values using a variable as the definition.

The code snippet example below will always give an 'Enumerated Value expected' error when run for the opts.colorCompression option even though the string is correct. If I define the opts as opts.colCompression = compressionQuality.AUTOMATICJPEGHIGH then everythings works

how I can define the compressionQuality.AUTOMATICJPEGHIGH as a variable the will work

Code snippet

opts = new PDFSaveOptions();
opts.compatibility = PDFCompatibility.ACROBAT5;
opts.generateThumbnails = thumbnailValue;

[Code]....

View 5 Replies View Related

AutoCAD Inventor :: Defining Surfaces And / Or Materials - BOM

Jan 24, 2013

I have successfully opened a STEP file from our Engineering group and saved it away as an Inventor Assembly. I would like to define Materials and/or Surface finishes for all parts. Why wouldn't the Surfaces and Materials synchronize between the Styudio's Surface Creator and the BOM Materials Control in the Assembly area?

I have found the way to define a new Surface in the "Inventor Studio" Interface and saved it with a unique name. Now, I would like to assign that Surface as a Material to the parts in the assembly ... and of course I would like to define numerous other surfaces and materials for assignment to all the parts throughout the assembly. Finally, I would like these surfaces / materials to follow the model into Showcase for presentation purposes.

View 1 Replies View Related

AutoCAD Inventor :: Create List Of Text Strings To Select From Defining Material Thickness?

Nov 7, 2011

Im trying to create a list of text strings to select from defining material thickness and then plug that selection into a global form custom iproperty called "MaterialDescription".. Also, is it possible to access and pre-enter field text edit items in iLogic?

View 3 Replies View Related

AutoCAD Inventor :: Close ILogic Form With VBA Or ILogic Rule

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

AutoCAD Inventor :: Variable Spiral Thickness

Oct 20, 2011

Is there a way to use the coil command to make a spiral out of a rectangle where the thickness of the rectangle starts at one value and ends at another? This would be a spiral torsion spring with decreasing thickness approaching the center.

View 5 Replies View Related

AutoCAD Inventor :: How To Pass Variable From One Addin To Another

Aug 25, 2013

I've used vb.net to write two separate addins.  I was wondering if there is a way to pass a variable from one addin to another similar to the way shared variables are passed from rule to rule in iLogic.

View 2 Replies View Related

AutoCAD Inventor :: How To Create Helix With Variable Section

Sep 25, 2013

how to create an helix with variable section?. The axis diameter is constant.

View 3 Replies View Related

AutoCAD Inventor :: Apply Variable Pressure To A Surface With FEA

Feb 16, 2012

If I enter the Stress Analysis Environment in 2012, I can apply pressures to surfaces, but what if the pressure varies (eg, with height as it does in a tank holding a fluid). Is it possible to apply a variable pressure to a surface with Inventor's FEA? It doesn't seem like it, I also searched this forum and the net, couldn't find anything. Usually one can enter an equation, that also doesn't work.

View 3 Replies View Related

AutoCAD Inventor :: Variable Radius Going Wrong Direction

Sep 6, 2012

Trying to apply a variable radius to a part. The direction of the radius is wrong (pointed back in toward the part) and I cant get it to go the other way.  As long as all the fillets along the curve are the same radius, the fillet will compute, but if I make them vary, then it fails.

View 2 Replies View Related

AutoCAD Inventor :: Add Sheet Name To Title Block Of Drawings With Variable?

Apr 15, 2009

Is there a way to add the sheet name to the title block of drawings with a variable?

I can add the sheet number, revision and size but not the name. Why not?

View 8 Replies View Related

AutoCAD Inventor :: Variable IProperty Data On Placed Components In Assembly

Apr 15, 2013

I want to create numerous custom properties for a part. Some of these will be the same for all instances of the part (i.e. vendor, part number, etc).  But some have to vary from instance to instance.

So, as an example - if I place 5 identical tanks into my assembly I need to assign unique text entries for each of these 5 instances (i.e. TANK-01, TANK-02, TANK-03, etc)

Furthermore, all these textual properties have to be able to be shown physically on the part (for identification on plots) and extractable for BOMs, etc. It seems that any custom i Properties I set up are global for all instances of the part.

View 1 Replies View Related

AutoCAD Inventor :: Variable Pitch Helix By Equation Curve

Jun 20, 2012

You can create a variable pitch helix by using the Equation Curve feature introduced in Inventor 2013.

Create a new 3D Sketch. Start the Equation Curve command.

Here are equations that I use to create helical curves. Many other variations exist.

Cartesian coordinates:

x(t) = radius * sin(360 * num_turns * t) 
y(t) = radius * cos(360 * num_turns * t)
z(t) = height * t

[Code]....

When you sweep a profile along a helical path, use the plane normal sweep (instead of perpendicular sweep) to orient profiles suitable for coil or spring.  In the example below, the sweep path is a constant radius, variable pitch helix.

View 9 Replies View Related

AutoCAD Inventor :: Use Of Environment Variable To Point To Project Folder?

Feb 6, 2012

Sys Config:

Win7Pro, SP1, x64

Inventor 2011, SP1, no Vault available

I am trying to use a Windows environment variable to point to my root directory where the projects are stored. When I type %MYINVPROJECTROOT%/newproject/... into the path of a new project, it seems Inventor is unable to resolve the path. 

We use SVN to collaborate, hence, instead of forcing everybody to the same folder structure, we keep everything in SVN and people just need to set an env var to point to the respective folders where they checked out their working copy. This is especially useful when working with branches, etc.  All other engineering tools seem fine with this (MATLAB, Labview, Maple, ...) only Inventor seems to fall behind.

View 3 Replies View Related

AutoCAD Inventor :: Constrain And Variable Length Piston At Both Ends?

Jun 14, 2012

I've got the basics down, made a couple of basic parts and a simple assembly but having a bit of an issue with constraining a part at 2 ends.

basically, i've got a simple wheel with a piston attached, think steam engine drive wheel. Ive produced a frame to attached it all too and can position the wheel to the frame and piston to the wheel and the cylinder to the piston but when i try to constrain the other end of the cylinder to the frame it all seems to go wrong and things start jumping all over the layout.

View 4 Replies View Related

GIMP :: Unbound Variable Error With No Variable?

Nov 5, 2013

I'm attempting to write a batch script to add some layers to a pre-existing image and save a copy. I've gone through the tutorial, and have run the demo code from Basic_Batch with no errors, but my (what I think of as simple) script throws an "Error: eval: unbound variable: ?" It also seems to cascade the error to other scripts, as I then get "unmatched parentheses: 2" errors from what I assume to be the script immediately following my own during Script-Fu load. This occurs whether running from batch or clicking "Refresh Scripts" from the Script-Fu menu.

What I could find on this forum and Google suggests that I may be required to 'define' one or more of my variables before using it, but for the life of me, I can't figure out which one that would be, and the error (reporting that '?' is undefined!?) I've quintuply (probably more ~_^) checked my parenthesis matching, but they look fine to me.

In case this was an encoding issue, I've tried saving my .scm file as both UTF-8 and ANSI. I should also note that I'm running Windows 7 x64 in English-US.

Script:

(define (script-fu-build-imagebasefilemytext)(let*((image (car (gimp-file-load RUN-NONINTERACTIVE basefile basefile)))(drawable (car (gimp-image-get-active-layer image)))(title (car (gimp-text-layer-new image mytext "Courier" 18 UNIT-POINT))))(gimp-image-add-layer image title -1)(gimp-image-clean-all image)(gimp-file-save RUN-NONINTERACTIVE image drawable "K:\\Images\\Temp.gif" "Temp.gif")));

Since I intend for this script to only be run from batch, I haven't bothered including the typical register stuff.

View 6 Replies View Related

AutoCAD Inventor :: Set Sheet Metal Rules Thickness To A UserParameter Variable

Sep 16, 2011

We are using 2011.I created a VBA tool that populates the FX Userparameters with a Thickness Variable..How do I set the Sheet Metal Rules Thickness to the new new FX UserParameter Thickness Variable?

for example:

The Userparamter variable name is "cab_thk"

Under Sheet Metal Defaults | Sheet Metal Rules | Sheet (Tab)

The Thickness entry should read "cab_thk"

View 3 Replies View Related

AutoCAD Civil 3D :: Defining New Units

Oct 13, 2009

Is it possible to define new unit, e.g. hectometer (=100m)?

View 4 Replies View Related

AutoCad :: Defining Dimensions Of Ellipse

Mar 15, 2007

I use all my knowledge of technical drawing from school many years ago to produce drawings in AutoCAD 2002, but I can't remember how you would define the dimensions of an ellipse in a drawing so that someone could produce it from the plotted output.

View 9 Replies View Related

AutoCAD 2010 :: Defining What It Means To Select Last

May 9, 2012

So I have this script I used to run in AutoCAD 2011 which involved mirroring a group of many layers and then moving the "last" object created. In 2011, when I moved "last", it considered everything I mirrored to be "last." In 2012, it is taking strinctly the last object I created, not the group of layers that I mirrored, to be "last." Is there an internal variable I can change so that "last" can mean everything I just mirrored again?

View 3 Replies View Related

AutoCAD LT :: Defining Attributes Using Command Line

Mar 28, 2013

For some reason I cannot get the ATTDEF Dialoge box to stop appearing and get the command line prompts. I have all the system variables set correctly -

FILEDIA = 0
ATTDIA = 0
CMDDIA = 0

The ATTDIA should surpress the diaolog box and give me prompts but it does not. 

View 4 Replies View Related

AutoCAD Civil 3D :: Defining Point Styles

Mar 16, 2012

Trying to figure out how to define the folder I want my drawing to search in to find a specific set of point styles we have set-up. As it is set up right now, I am not sure where the program is looking to find the standard set of point styles it is showing, but its just showing basic civil point (ie. CB's, IP's, BM's, etc.). I have tried a few things to make it automatically grab the point styles I have in a set-up folder but is won;t display them.

The reason I need this, is that I want to set it up so that when I import points from my survey file, I want them to automatically insert into my drawing as the correct block (or point style), based on the survey code used.

View 8 Replies View Related

AutoCAD Map 3D :: Defining A Global Coordinate System

May 18, 2009

Using Map 2008

When I click Setup->Define Global Coordinate System...

I recieve the following message:

Cannot open coordinate system dictionaries for write.

I attempt to define the CS in Map 2009 and am able to supply all required information.

When I click OK I recieve the following message:

Cannot add coordinate system to dictionary.

Is this information still stored at:

C:Program FilesCommon FilesAutodesk SharedGISCoordSys?

View 5 Replies View Related

AutoCAD Civil 3D :: Fatal Error When Defining Surface With ADF File

Aug 21, 2013

I have downloaded ArcGrid (ADF) files from the USGS and am trying to define a TIN surface in Civil 3D with those files.  I have done this in the past without difficulty but now I get a fatal error and the system crashes in the middle of the process.  The ADF files are large, approximately 465 meg, and cover an entire USGS quad area.  Is there any tricks or sollutions that would allow me to use this data source to create surfaces without my system crashing?

The system I am using is a Dell Intel Xeon CPU, W365@3.20GHz with 24 GB RAM, 64 Bit OS.

View 3 Replies View Related

AutoCAD Civil 3D :: Defining Object Data To Polyline And Polygon

Nov 24, 2013

Is there a way to define object data to a polygon or a poly line in C3d? I imported a shape file and saw that in the properties dialog box the object data of the polygons is displayed. I would like to define create new polygons and define certain atrributes to it before exporting it as a shape file. This would would eliminate the need to use a GIS program to define the attributes of the polygons. 

Im using PCSWMM and would like to define certain atributes to polygons and polylines in C3D before i import it in to PCSWMM.

View 2 Replies View Related

AutoCAD Inventor :: ILogic Design Copy - Error Copying A File / Inventor Crashes

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

AutoCAD Civil 3D :: Defining Grade Break Criteria In Cross Section?

Feb 7, 2013

I made a bunch of cross sections of an EG surface and want to define an elevation label at each significant grade break. I see an option to weed by distance but no option that would allow me to place a label at where the slope changes by more than a certain percent. 

I found this old thread from three years ago and the best solution to come out of it was deleting individual labels.

[URL]

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Defining Points For Spline Command

Apr 4, 2012

I am working on a little lisp routine to draw splines, but can't get it working. The basic idea is that i first select a set of points that i can feed to my spline command.
 
(defun c:test2 () (setq pt (getpoint "
define point:")) (setq ptlist nil) (while (not (equal pt nil)) (setq ptlist (cons pt ptlist)) (setq pt (getpoint "
define point:")) ) )

Now i need to draw a spline based on these points. My plan whas to simply use the acad command itself. But this option didn't work.
 
(command "spline" ptlist "")

Then i tried using the vla-addspline command. But i can't even get this one working .

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved