Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read variables in Excel from Solid edge

Status
Not open for further replies.

telcom2011

Electrical
Joined
Jul 29, 2011
Messages
5
Location
DE
I have problem for readying a defined variable in the Solid edge in Excel.

I can not access to the variable from Vb of Excel.

For editing a variable this code for example is ok:
Call objVariables.Edit("Var_1", 0)
I want some way similar to get the value of a variable for example some function like:
Var_value= objVariables.GetValue("Var_1")

Please if you know help me.

Thank you in advance
 
I found one trick for this solving this problem.
In the variable table of the Solid edge, right click on the variable then select copy link. on a sheet in an Excel file which you are running the macro right click on a cell and select paste special..., then select paste as a link.
Now you have the value of the variable in your Excel file, you are able to access to this cell by VB in macro.

 
I found the way to read, wanna share with u. In case use it.
If u want a variable in Vb from SolidEdge just use the following

MsgBox (objVariables("aRotore").Value)
* take care angle is in radiant, distance in meter.

If u want to change a variable in SolidEdge via Excel Vb

Call objVariables.Edit("Blocco", "0")

Thanks to for great help.

r
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top