AutoCAD Inventor :: Passing A Function Name To Another Function

Nov 13, 2012

I'm trying to be able to have a function run another function with the secondary function being passed as an argument to the first. I'm trying to create a recursive function and the recursive part works great. I just need to be able to have the recursive function run other functions to actually do stuff.

Here is something I found that should do what I need, mainly run a function from a function name in a variable.
 
Sub test() Dim ftnName As String Dim argument As String Dim result As String ftnName = "myFunction" argument = "cat" result = Application.Run(ftnName, argument) MsgBox resultEnd SubFunction myFunction(inString As String) As String myFunction = inString & " has " & Len(inString) & " letters."End Function

 However I get the error "object required" on the "result = Application.Run(ftnName, argument)" line. So I'm guessing the Inventor VBA doesn't like this method of doing this. I'm just hoping there is a way to do this or this function will be useless or reduced to hardcoding functions which still defeats the purpose.

View 2 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Passing A List Of Points To Function Instead Of User Input

Sep 16, 2013

I have a list function that asks for the user to pick points when it is run. It looks something like this (foo arg1 arg2) When invoked it asks the user to pick points and press enter when done It.

Instead of getting the points from the user i want to pass it a list of pre-defined points. The code cannot be changed so I must use it as is.Is this possible, if so how can it be done?

View 9 Replies View Related

Edge Animate CC :: Passing Parameter To Function On Stage From Symbol

Jun 24, 2013

I have a symbol on the stage: symbol1.Inside symbol1 I have an image: symbol1_image1...I have another symbol on the stage: symbol2 Inside symbol2 I have an image: symbol2_image2
 
in composition.ready I have an action on the mouseout for symbol1:

var theTarget = sym.getComposition().getStage().getSymbol('symbol2').$('symbol2_image2');
sym.getComposition().getStage().doMouseoutGS(theTarget);
 
In composition.ready i have the following function defined

sym.doMouseout = function (colorTile){
sym.$(colorTile.show());
}
 
I cannot get this to work and I am not understanding why.If I do an alert on the mouseout function for alert($(colorTile).attr("id")); I get the correct referenc to the element I want to show but it does not actually  happen

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: No Function Definition With Distance Function

Oct 25, 2013

This seems absolutly silly.

(setq p1 (getpoint))
(setq p2 (getpoint))

(setq Dist (distance p1 p2))

Why does this not work?

I'm trying to build a command to replace AutoCAD's "DI" command, to give distance and delta x, y, and z values in decimal and imperial, and keep the angles in XY plane and out of XY plane.

View 9 Replies View Related

AutoCAD Inventor :: Function To Set Colors

Sep 14, 2013

I have a big assembly consisting of a large number of sub assemblies and parts.I would like to be able to quickly show color alternatives. All painted parts will be painted in one of two colors.I would like to have a function that takes two color arguments that will set the color of a number of parts to the first color and some other parts to the second color. Not all parts need to be painted.

set the color of all parts in a assembly to one color.But I have two sets of parts for different colors and not all parts need to be colored.How can I do this best? iLogic? How do I have to input the colors?

How to deal with repeating patterns (should still work when changing the repeat count)?Also, there should be some text on some parts. Can I also change this text color automatically?

View 3 Replies View Related

AutoCAD Inventor :: How To Use Or Find PCD Function

Nov 24, 2011

i dont know how to use or find the PCD  function. All i have is a base however i need to make holes with 90 degrees on a 100 PCD

View 2 Replies View Related

AutoCAD Inventor :: Rib Function Cannot Create Rib

Dec 26, 2011

I'm trying to create a rib from the sketch shown.  Before I go to support with this, how to make it work or why it won't?  I think Inventor just isn't up to it.  If I add perpendicular lines to the endpoints of the line shown, it'll make rib, but the rib isn't right - i.e. it doesn't maintain tangency the way it should.  I'd rather not have to go through and surface it.

Infrastructure DSP '14 / Product DSP '14 / Vault Professional 2014
Dell Precision T1650
Windows 7 Professional SP1 64-bit
Intel E3-1270 V2 3.5GHz / 32G RAM
Nvidia Quadro 2000, Driver 331.82
Space Navigator, Driver Version 6.17.7

View 1 Replies View Related

AutoCAD Inventor :: How To Get The Thread Function

Jun 13, 2012

I have recently installed Inventor 2013 Professional Ultimate and am having some issues.  I can not seem to get the Thread function to work.  When I go to apply a thread I get the follow error....

When I go to search the directory, I find that the Thread xls document is infact there, but it is not located where the program thinks it should be (XLS Folder --> en-US Folder)

I also made sure that the Design Data location was correct within the Application Options...

A reboot of the computer did not work.

View 1 Replies View Related

AutoCAD Inventor :: Custom VBA Function In Parameter

Jan 31, 2013

I've got a custom VBA function that works perfectly when called from a parameter in my part.

However, when in the context of my assembly, there is no error, but the function no longer runs, and the parameter text is red.

Apparently, the function is no longer in context?

I've heard of external rules, but have never implemented one.

Is there a way to declare my function and keep it in context regardless?
 
Public Function BumpHeight(dblHeight As Double, dblMember As Double) As Double Dim X As Integer X = 2 If dblHeight > dblMember * 2 Then BumpHeight = dblHeight Else BumpHeight = dblMember * X End If BumpHeight = BumpHeight / 2.54 End Function
Here is the Parameter:

 VBA:BumpHeight(ValanceBackBumpoutHeight;ValanceMemberSize) * 1 in

Update: (problem better defined)

What seems to be happening is that once I insert the part into an assembly, it creates a new blank copy of the parts' modules in VBA and the functions no longer work.

If I go to the VBA editor, 

There are now two copies of my part listed in the browser tree, but the new one is blank.

If I paste in my function to the new one, it will work until I return to the parent assembly.

Next time I come back to the part, it will have a new blank set of modules.

This appears to continue indefinitely...

see the attached screenshot.

At this point there are only 2 copies of the DocumentProject. The original still contains my functions, but the new one is blank.

I need these functions to work in order to build my model.

View 1 Replies View Related

AutoCAD Inventor :: Fame Analysis Function

Dec 22, 2011

I have purchased the Autodesk Product Design Suite Premium. It comes with the Frame Generator but does not seem to have the Frame Analysis with it. Is that provided in other Suites or should I have it??

View 1 Replies View Related

AutoCAD Inventor :: Changing Zoom Function In 2D?

Aug 29, 2012

When I use AutoCAD Inventor:

* Rolling the mouse wheel toward me, the object zooms larger, and

* Rolling the mouse wheel away from my body, the object zooms smaller.

Just the opposite, when I use good ole' 2D AutoCAD and AutoCAD Electrical:

* Rolling the mouse wheel toward me, the object zooms smaller, and

* Rolling the mouse wheel away from my body, the object zooms larger.

Is it possible to change the zoom function in 2D AutoCAD and AutoCAD Electrical to operate in the same fashion as in Inventor . . .

View 2 Replies View Related

AutoCAD Inventor :: F7 Type Function In Assembly

Dec 18, 2013

When creating a part in .ipt, you can press F7 to remove everything forward of the plane that you are sketching on. Is there a similar function when you create a part in an assembly that removes everything up to the sketch plane?

View 5 Replies View Related

AutoCAD Inventor :: Use Function In External Rule

Oct 28, 2013

I have an ilogic external rule which contains functions that I use from rules in my local assembly document. I'm trying to access the value of a parameter in the document from the external rule's function. Attached is a simple version of what I'm trying to do. If I manually run the external rule, it seems to work just fine, but when I call on the function from a seperate rule, its unable to get the parameter value. I get an error stating, "'Parameter' is not declared. It may be inaccessible due to its protection level."

'this is the external rule. if I run this manually, it works

Public Class test_functionsSub Mainmyresult = ""thisisatest(myresult)MsgBox(myresult)End SubFunction thisisatest(ByRef resultcreated As String)resultcreated = "it worked - " & Parameter("ParameterInDocument")End FunctionEnd Class
 
'this is my rule in the assembly document trying to use the external rule's function

AddVbFile "z_testrule.iLogicVb"Dim external_rule As New test_functionsmyresult = ""external_rule.thisisatest(myresult)MsgBox(myresult)

View 3 Replies View Related

AutoCAD Inventor :: How To Animate Grounded Function

Oct 30, 2013

Is it possible to animate the Grounded function? I want the box (In the assembly that I attached) to walk through a line of stations, each one of them with a specific purpose, in a factory where the "solar collector" is being built.I am unable to switch between who's gonna be grounded during the animation, but maybe there's another way to do it?

View 6 Replies View Related

AutoCAD Inventor :: Calling AddIn Function From Outside

Dec 17, 2013

I would like to make an Inventor AddIn with commands (functions) that can be called from other standalone applications. I have tried to create a COM interface for my AddIn, and that works with rather small effort, but I think I have heard that it should be possible to do this without the COM interface. I would like to avoid COM if possible. if I need to do anything special in the AddIn to make the function visible and how I on client side calls the function.

View 1 Replies View Related

AutoCAD Inventor :: RectangularPatternFeature Add Function Parameters 2d Or 3d?

Jul 26, 2013

In the Add function documentation there are two parameters XDirectionStartPoint and YDirectionStartPoint.

But are these 3d or 2d points? Maybe 2d points on a sketch.

And if there was a c++ example of use it.

View 2 Replies View Related

AutoCAD Inventor :: Close Loop Function

Oct 23, 2012

Have sketched the geometry for an 18 tooth circular sawblade. However I have had difficulty applying the close loop function. As a result am not yet able to extrude the saw blade. What to do to implement close loop?

View 4 Replies View Related

AutoCAD Inventor :: 3D Sweep Path Using Specific (x / Y / Z) Function

Feb 13, 2011

I have a project I'm working on which requires a sweep path to be a graphical parametric mathematical function in x, y and z.

ex: 

x=1.25*sin(10*t)
y=sin(t)*(12+1.25*cos(10*t))+12
z=cos(t)*(12+1.25*cos(10*t))

(this curve is a groove in the surface a bicycle tire. It spirals around several times and gets subtracted from a solid torus)

I was using an old version of NX I-DEAS and this task was easily accomplished with the "function spline" feature. Is anything like this possible in Inventor? I know I could create a list of points in excel, but I'd really prefer not to.

View 9 Replies View Related

AutoCAD Inventor :: Turn Off Auto Route Function?

Apr 23, 2013

How to turn off the Auto route function?

View 1 Replies View Related

AutoCAD Inventor :: Select Other Function Is Not Working Or Turned Off?

Apr 9, 2012

I can't get the select other function to work.  When doing a measurement, if I right click on an item, then click "select other", nothing happens.  This also is the case when applying constraints. In application options, the select other timer is set to 2.0 sec., it is not set to off.

View 7 Replies View Related

AutoCAD Inventor :: Why Does Equation Curve Function Not Work

May 10, 2012

Trying to do something as simple as y=x^3 (Explicit Mode). Set xmin = 10, xmax = 20 then tried y(x) = :

1in *(x^3) -- no good
(x^3)/1 in -- no good
(x/1 in)^3 -- no good

Error is that "Equation y(x) contains errors. Expected units are length".

The point here is: Why should typing in such a simple equation as y=x^3 be so difficult??? Can't even do (x*x*x)/1 in & make it work.

View 4 Replies View Related

AutoCAD Inventor :: Add A Cancel Function To Create View

Sep 23, 2004

Any way this can happen in a reasonable time frame, say in a release or 2,since view creation takes so long?Or did you development guys sneak that into R9?

View 4 Replies View Related

AutoCAD Inventor :: Two Line Intersect Point Function?

May 25, 2012

Does SDK have two line Intersect Point?

View 3 Replies View Related

AutoCAD Inventor :: Creating A Shape From A Mathematical Function

Mar 29, 2013

Using Mathcad, I can create a file with x and y values defining a 2D shape from which I want to create a swept volume.

I want to import these values into Inventor to use as a definition of a sketched line and then use the revolve function to generate the shape. 

View 6 Replies View Related

AutoCAD Inventor :: Preview IProperties Function In Dialog

Mar 8, 2013

I'm working on my dialog for editing iproperties again and I'd like to make it preview the output of a function. We like using functions in the description for calling out material sizes using parameters. So I have my dialog get the function in the description iproperty, but if you don't know what parameters are what it can be hard to work with.

I'd like to show the evaluated description function so it's easier to work with.

Description function

=<G_H> x <G_W> x <G_T> S.S. TUBE x <G_L>

Evaluated description shown in BOM

4.00 in x 2.00 in x 0.19 in S.S. TUBE x 21.00 in

I know it'd be possible to set the iproperty and get the evaluated version after setting it. But if the user cancels out of the dialog that change would have to be undone, which would require storing the original value and resetting it on cancel. Is there a way to evaluate the function without setting it first?

View 2 Replies View Related

AutoCAD Inventor :: Save AS Copy To DXF - Route Does Not Function

Jun 24, 2013

I am having a problem with Save AS Copy To DXF.

When I try the 'Save copy as' DXF route it does not function. If I click the save button nothing happens and if I click the option button nothing happens either. In 2012 when you click the options button you would have got the option to change the export settings i.e. all sheets etc...

I do have the option to change the file formats via the drop down box in the 'save copy as' dialogue box and dxf etc are listed!

When I right click on the flat pattern in 'Model' there is no button for 'Export' in the list that appears. Therefore I cannot get to the Flat pattern dxf export options prompt as shown in this thread.

Its obvious you should be able to save as a dxf from an inventor idw as the buttons are there they are just not working!

I am having this problem with Autodesk Design Suite Premium. Inventor 2014 will not give me options, and is having problem exporting to autocad dwg. tried a reinstall as it appears to wotk properly on other similar installed machines.

View 4 Replies View Related

AutoCAD Inventor :: Finding Scale Factor Function In 2012?

Aug 4, 2012

i want to ask is there any scale factor function in Autodesk Inventor 2012?

this is because all my drawed part are already full constrained and I want to enlarge it to some factor?

View 1 Replies View Related

AutoCAD Inventor :: Trigger (Save And Send To Cloud) Function In API?

Feb 10, 2013

Is there anyway to trigger the "Save and Send to Cloud" function in the API?

View 1 Replies View Related

AutoCAD Inventor :: Disabling Spacebar Repeat Last Command Function?

Jul 17, 2010

Since Inventor 2010, the spacebar has the functionality of repeating the last command. We have an add-in that requires typing  a short phrase. (You can see where this is headed) 

Whenever you use the spacebar to seperate the words in the phrase, a new addin form opens in front of the old one.

This add-in is employing the WordWrapper code that Brian submitted some time ago to clear up a similiar issue when you used the Enter key, but the spacebar problem persists

Is there a way to disable this funtion? Or work around it?

View 7 Replies View Related

AutoCAD Inventor :: How To Make Override Shortcuts To Function Keys

Aug 3, 2009

I try to assign a shortcut to a function using VBA. (I find the same problem when I do it through the UI of Inventor)

ThisApplication.CommandManager.ControlDefinitions.Item(...).OverrideShortcut
ThisApplication.CommandManager.ControlDefinitions.Item(...).OverrideShortcutType

when I assign "" to OverrideShortcut the the OverrideShortcutType is kNoShortcut
when I assign "D" to OverrideShortcut the the OverrideShortcutType is kAliasShortcut
when I assign "Ctrl+D" to OverrideShortcut the the OverrideShortcutType is kAcceleratorShortcut

So far so good but now:

when I assign "F11" to OverrideShortcut the the OverrideShortcutType becomes kAliasShortcut resulting in:

I have to type F 11 to launch the command. What I want is to Press the key F11 to lunch the command instead of typing F 11

(This works good with Ctrl+D but not with F11)

Can I work around this to use the Function key's ?

View 1 Replies View Related

AutoCAD Inventor :: Function Evaluation - Rounding To Nearest Whole Number

Mar 14, 2012

One of the users on mCADForums discovered this bug.

"I have a value of 3516.41mm and I want to round it to the nearest whole number.

I have tried to use the round command and it seems to round up to the nearest 10 so 3516.41mm would round up to 3520mm. So how do I get would I go about rounding to the nearest whole number?"

I suspect this is due to Inventor's internal units being cm.  However as we specific "a" to be in mm and "b" to be in mm this should not be happening. 

View 1 Replies View Related







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