Autodesk Inventor
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
ILOGIC CODE TO SWITCH G_ W & G_T
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
109 Views, 1 Replies
02-05-2013 12:35 AM
HI All
I am after some code to enable the switching of parameter name's
I need the following if i could have some help
- Change user parameter G_W in paramters dialog box to G_T
- Change user parameter G_T in paramters dialog box to G_W
basically i want them to swap over and i will be running this as a external rule.
Any help will be appreciated
Dave
Solved! Go to Solution.
Re: ILOGIC CODE TO SWITCH G_ W & G_T
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-05-2013 04:26 AM in reply to:
dclunie
This code can do the job for you:
Rob.
'create a temporary variable and assign names to them
SharedVariable("OrigG_W") = Parameter.Param("G_W").Name
SharedVariable("OrigG_T") = Parameter.Param("G_T").Name
'rename the current parameters with a temporary name
Parameter.Param("G_W").Name = "OrigG_W"
Parameter.Param("G_T").Name = "OrigG_T"
'rename the temporary parameter name to the one from the sharedvariable
Parameter.Param("OrigG_W").Name = SharedVariable("OrigG_T")
Parameter.Param("OrigG_T").Name = SharedVariable("OrigG_W")
'remove all the sharedvariable
SharedVariable.RemoveAll()
Autodesk Inventor 2012 Certified Associate & Autodesk Inventor 2012 Certified Professional.
Software in use: Inventor 2013, SolidWorks 2011
Also experience with: Solid Edge untill ST4,
Software in use: Inventor 2013, SolidWorks 2011
Also experience with: Solid Edge untill ST4,
