AutoCAD Inventor :: Using Global Variables

Aug 30, 2011

I've been working on converting a VBA macro to an Add-In (my first). I thought all was going well, but I'm struggling to share the InventorApplication object within my add-in...

All the googling I've done suggests the most suitable way is to declare it as a global variable. So I followed the work flow on this page:
([URL]......) and created a module to declare my global variables. I've then referenced this module back in the original class, but when I do, I get a message saying "modDeclarations is a type and cannot be used as an expression"..

So here's what I've got:

View 3 Replies


ADVERTISEMENT

AutoCAD Inventor :: Global Form Location

Nov 6, 2012

Ok so where are Global Forms saved in 2013?

Inventor Pro 2013 (PDS Ultimate)
Vault Pro 2013
Windows 7 64
Xeon 2.4 Ghz 12GB

View 3 Replies View Related

AutoCAD Inventor :: Global SIZE Column In BOM Possible?

Feb 7, 2013

I have written code to allow me to pick the dimensions of a part and update the dimension parameter name from a list of choices presented in a form e.g. length, width, thickness, outer_diameter, wall etc. 

The parameters are exported and I can get overall sizes in the BOM with relevant expressions in columns.  So far so good.

What I would like to do is have a global SIZE column in the BOM which has expressions that vary based on another custom iproperty (PartType) which defines the part.  So for example if the PartType was 'circular plate' the expression in that parts row of the SIZE column would be <outer_diameter>x<Thickness> while if the PartType was 'tube' the expression in the that parts row would be <Outer Diameter>x<Wall>x<Length> etc

If I could do this I would not need different columns to define the sizes of every different type of material we use and also limit the number of parameters the user needs to choose from when picking part dimensions.

However looking at the BOM API I do not see an obvious way to alter the expressions. 

View 3 Replies View Related

AutoCAD Inventor :: Can Dynamic Simulation Drive Multiple Variables With Single Parameter

Aug 2, 2013

Can Dynamic Simulation drive multiple variables with a single parameter? In the following example, the variables len_A and len_B are driven by size. The parameter "size" varies from .8 to 1.2 (currently I have size parameters in a Multi-Value List).

Is there a way Dynamic Simulation can drive the "size" parameter to animate the assembly? I plan to use Dynamic Simulation's Output Grapher to Plot a Trace of the triangle's apex as A and B vary in length. The example assembly is attached.

View 4 Replies View Related

AutoCAD Inventor :: How To Select Entity From Global X Y Z Position

Dec 21, 2013

I am new to Inventor API, but have some experiences in SolidWorks API. 

How can I select an entity at a given spacial point (x, y, z)? For example, I want to select a face or edge that is on a given (x, y, z) point. I can not find such an API, except for interactive selections.

View 3 Replies View Related

AutoCAD Inventor :: A Global Transient Geometry Object?

Jul 2, 2013

I've found myself using this code often:
 
// Get the transient geometry object. We'll use this to create pure geometryCComPtr<TransientGeometry> pTrGeom;pTrGeom = pApp->TransientGeometry;
 
But I was thinking, once I have pTrGeom can I just declare a global to hold it while my Inventor instance is running?

Alternatively I suppose I could have a global function which does this:
 
CComPtr<TransientGeometry> GetTransientGeometryPtr(){ static CComPtr<TransientGeometry> pTrGeom = NULL ;
if (pTrGeom == NULL) pTrGeom = pApp->TransientGeometry; return (pTrGeom) ;}
 
So it reduces to a one-liner. But in COM is that static valid? I know the code is not complete above, but you get the idea.

What do other C++ COM programmers do here...?

View 8 Replies View Related

AutoCAD Inventor :: Export ILogic Global Form From 2013 Into 2014

Oct 18, 2013

I have a Global Form in 2013 that I want to get into 2014.  I cannot seem to export it from the iLogic browser, not can I edit it in the editor.

Inventor Professional 2014
Windows 7, x64
Dual-core i7, 8GB RAM
NVIDIA Quadro FX 880M
HP Elitebook 8540w

View 1 Replies View Related

AutoCAD Inventor :: 2012 Crashing Upon Local / Global Update Execution

Nov 9, 2011

So 2011 had some issue and I though 2012 would get those fixed. I was wrong. More problems occur. With 2011 I was able to open assemblies directly through vault. Now with 2012, since the vault issue updates as it opens, I crash on any sizeable model or assembly. So now just to open  a file, I must get it, then go to inventor and open it, and hit no when the refresh window come up. If I hit yes, it crashes. If I hit no it open, then if i hit local/global update it crashes. So technically I cant do any new work with any of my larger assemblies (2000+ parts) I have sent out numerous error reposrt, only for autodesk to say that they can replicate the problem. I have SP1 installed, and this is happening with other users at my company as well.

System:

Windows 7
64 Bit
Solid State HD
24GB RAM
Xenon Processor
Nvidia Quadro FX 580

View 1 Replies View Related

AutoCAD Inventor :: Global Forms Button To Immediately Launch External Rule?

Apr 4, 2013

I would like to instantly launch an External Rule just by clicking on a button in the Global Forms area of the iLogic browser.  Is this possible, and if so, how would I do it?

Product Design Suite Ultimate 2014 | Vault Basic 2014 (SP1)
Dell Precision M6600 | Intel i7-2820QM - 16GB
nVIDIA Quadro 4000M | Windows 7/64 Pro

View 2 Replies View Related

AutoCAD .NET :: Accessing Variables

Dec 1, 2013

Am I able to access and read and write to the file holding the variables used in the parameters-manager's palette.  Ideally, I want to read the value held for an action-parameter, do some math using C, and write the result back to the file as a user-parameter which may be seen in the parameters-manager's palette.

View 2 Replies View Related

AutoCAD LT :: Block Attributes With Variables?

Aug 7, 2013

Using ACAD2014LT.  I want to use the first variable attribute value as a variable in subsequent attributes in the same block.  This will be extracted and used for tag references in a PLC program.

Along the line, i know I can change the enclosed character ( ' ), but can I remove it?

View 3 Replies View Related

AutoCAD .NET :: Save Some Variables Into DWG File - How

Sep 12, 2012

if I'm able to save some variables into current DWG?I would like to provide availability for user to save some data which is different for each DWG file.

View 9 Replies View Related

AutoCAD .NET :: Extract All System Variables

Oct 14, 2011

I was wondering if there is any way to dump out all system variables with current value in a text file. One way would be to have the variable names already preset in a list of strings then extract them. But is there any other faster way? I need to compare some drawings side by side.

View 6 Replies View Related

AutoCAD .NET :: Reading Some Variables Into DWG File?

May 3, 2013

reading some variables into DWG file - how? C#.

View 3 Replies View Related

AutoCAD VB :: Public Shared Variables

May 3, 2012

I have several variables I want to be able to set and then use throughout my project.

First, and seems simplest, would be to just Public Shared the variables. Set them as required, call them when needed.

Second would be to create an object and assign the variables as properties to that object. It would take more programming to do this option. The beauty of this would be that I could store the values from drawing session to drawing session and would not have to ask the user for the values every time he starts my program. Can this be a custom dictionary object? Is that how you would design it?

Unless there is a way to make my Public Shared variables hold their values when the drawing is closed. Static doesn't seem to work here, but I could be missing something.

View 3 Replies View Related

AutoCad :: Baseview System Variables

Jun 17, 2013

when using baseview / viewbase how can I make the resulting views linetypes, weights and colors what I want by default. Currently I change them after creating the views.

View 3 Replies View Related

AutoCAD .NET :: Saving UCS Using Current System Variables

Dec 12, 2012

Using the VB.NET example code on exchange.autodesk.com for Defining a User Coordinate System, I pretty much copy and pasted the code to suit my needs. While the example shows how to create a UCS origin, X Axis and Y Axis from scratch, I am attempting to simply cast the values from the system variables UCSORG, UCSXDIR and UCSYDIR. These system variables are read only, and when looking into the types, I believe they are all 3D Point type values. 

I'm experiencing errors when trying to run the following code, and it's making me wonder whether what I'm attempting to do is possible. The JIT Debugger is pointing out a System.InvalidCastException. Is there a problem with setting a Point3D value (from the system variable) to a Vector3D type (which is required for defining a new ucs)?  

Public Sub saveCurrentUcs()
'get the current document and database
Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim acCurDb As Database = acDoc.Database

[Code]....

View 1 Replies View Related

AutoCAD .NET :: Change The Value Of User Variables In 2010?

Jan 30, 2013

Parametric Drawing about  .net API。

I define a user Variables in autocad2010(such as variableaa=10),I want to use the variable to drive the dimension of a line。

Now I want to change the value of  variableaa  through  .net API,can you tell me how to change the value of  variableaa  through .net API? can you tell me the code?

View 2 Replies View Related

AutoCAD .NET :: Change The Value Of User Variables Of 201​0 Through API?

Feb 20, 2013

this is a screenshot of the dwg-file。

I want to change the value of user1  through  .net API(user1 is a User Variables),my purpose is to change the length of the line.could you tell me the code?

View 2 Replies View Related

AutoCad :: List Favorite System Variables

May 17, 2013

Why the system variable is valuable to you if you can. CTAB - Useful in FIELD with Layouts for titleblock sheet numbering.OFFSETGAPTYPE - Multiple offset settings.

View 9 Replies View Related

AutoCAD LT :: Get List Of Variables And Commands From Help File?

Aug 1, 2012

how to get a list of Variables and Commands from the Help file?

View 9 Replies View Related

AutoCad :: Pull Up System Variables Dialog Box

Oct 2, 2012

How do I pull up the system variables dialog box? (also is it considered a dialog box?)

I've always changed individual variables at the command line and in all honesty I didn't even know there was a Dialog box for them until I saw a picture of one on a post here.

View 4 Replies View Related

AutoCad :: Get List Of Commands And Variables In 2013?

Dec 28, 2012

How to get a list of commands and variables in AutoCad 2013. In the past I always got that from the help files, but it seems now that I cannot find in the help files in this new version of AutoCad 2013.

View 4 Replies View Related

AutoCAD 2013 :: How To Manage System Variables

Oct 2, 2013

We have six CAD machines in our office (not including several versions of LT), and only one machine "AutoCAD 2013" is having this issue: 

ATTREQ & ATTMODE keep changing to undesirable values.

We generally use "ATTREQ 0" and "ATTMODE 1" and NEVER change these except "ATTREQ" gets changed in some LISP routines depending on the insert, but "ATTMODE" had to be looked up because we never change it from 1.

I know that there is no reference to ATTMODE anywhere in our customizations.

Does AutoCAD try to manage these system variables? Is there anything else that I can check to stop this?

View 6 Replies View Related

AutoCAD .NET :: Selecting Cells In Excel And Storing Them As Variables

Dec 3, 2013

While in my AutoCad drawing, I need to be able to select cells in an Excel database and use them as variables to create a drawing.  I've looked on the Internet and have found some bits and pieces of code for particular uses, but what I'm looking for is the methodology, or some training/examples on working with Excel and AutoCad using VB.net.

View 3 Replies View Related

AutoCAD LT :: QuickCalc Variables / Store For Use At Command Line

Oct 18, 2013

I have a few dozen variables that I am trying to store for use at the command line. I can only append to input area with the actual quickcalc open, how i can reinitialize the global variable list? 

View 9 Replies View Related

AutoCAD .NET :: Define And Assign Variables In Single Line

Aug 3, 2012

Why do most of the VB.Net examples, define and assign a variable in a single line as it is being used in the program.

In VBA I found it easier to read the code with the variables defined at the top of the function or subroutine.

What do most of you do when defining variables ?

I find the VB.net lines below more difficult to read ..............

For Each acSSObj As SelectedObject In acSSet

Dim acEnt As Entity = acTrans.GetObject(acSSObj.ObjectId,OpenMode.ForWrite)

View 3 Replies View Related

AutoCAD 2010 :: List Of Obsolete Commands / Variables

Feb 27, 2013

Is there a list of obsolete commands / variables AutoCAD 2012?

AutoCAD Commands, variables,  LISP commands, LISP variables?

View 3 Replies View Related

AutoCad :: Dynamic Blocks - Custom Variables / Values?

Jul 12, 2012

Just a quick query about Dynamic Blocks. I use dynamic blocks with various visibility states regularly in my drawings. Is it possible to add some kind of custom variable or value to a dynamic block so that I can identify them in automated scheduling?

For example, if I have a dynamic block which represents three variations of very similar machine models is it possible to somehow give each visibility state a value, ie: the model numbers. M100/M125/M150 etc which can then be extrapolated depending which visibility state is active?

Also regarding the limitations of dynamic blocks. Is there a number of visibility states I should not exceed so that the blocks still perform 100%?

View 3 Replies View Related

AutoCAD 2010 :: How To Use Macro To Set All System Variables In Drawing

Jan 29, 2013

When I create a new dwg, I use a macro to set all the system variables in the drawing - ltscale, hatch scale, etc. I also use the setq function and define a few new "variables" in the drawing. For instance I use setq to define a variable I call "sf" and set it equal to 72. Everything works great and I do my work and close the drawing. Next time I open the drawing, all my custom variables no longer exist. I have to use redefine them all over again. Is there a way to get these custom variables that I create with setq to stick with the drawing permanently - so I do not have to redefine them every time I close/open the drawing?

View 3 Replies View Related

AutoCad :: 2011 System Variables Lookup Sheets?

Feb 25, 2011

I have developed a handout for my students and graduates I thought I would share here:

[URL]

View 8 Replies View Related







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