User informations

CADCAM machining solution: mill-turn centers, milling and turning, kinematics, fixtures, topology recognition, tool library, manufacturing schedules, realistic simulation, workshop sheets, post-processors and DNC...

Moderators: remi77, Daniel, jacs

Post Reply
paul-ince
Private First Class
Private First Class
Posts: 11
Joined: Thu Dec 18, 2008 12:15 pm
Location: Marche

User informations

Post by paul-ince » Fri Apr 24, 2009 9:22 am

Hi!
It is possible to import User informations (menu: "file->properties->User informations") from a file to another one?

paul-ince
Private First Class
Private First Class
Posts: 11
Joined: Thu Dec 18, 2008 12:15 pm
Location: Marche

Post by paul-ince » Mon May 25, 2009 10:04 am

I did it!
I used a simple program made in vba from excel!!
It works!

micos3
Master Corporal
Master Corporal
Posts: 36
Joined: Tue Nov 27, 2007 8:14 am

Post by micos3 » Wed May 27, 2009 11:52 am

Hi.

Can u post the VBA code u use?

Thanks

paul-ince
Private First Class
Private First Class
Posts: 11
Joined: Thu Dec 18, 2008 12:15 pm
Location: Marche

Post by paul-ince » Wed May 27, 2009 4:38 pm

In a TopSolid document you create User properties with a specific names, for example $NAME, $QUANTITY... and so on.
Then you write in Excel cells A1, A2 the values you want to copy.
The TopSolid document has to be open, then you run this Macro:

Sub Micos3()
Dim topapp As TopSolid.Application
Dim topdoc As TopSolid.Document

Set topapp = New TopSolid.Application
Set topdoc = topapp.ActiveDocument

topdoc.SetProperty "$NAME", Range(A & "1").Value
topdoc.SetProperty "$QUANTITY", Range(A & "2").Value
...
end sub

kotlas
Corporal
Corporal
Posts: 21
Joined: Fri Jan 14, 2011 6:53 am

Post by kotlas » Thu Feb 24, 2011 7:27 am

paul-ince wrote:In a TopSolid document you create User properties with a specific names, for example $NAME, $QUANTITY... and so on.
Then you write in Excel cells A1, A2 the values you want to copy.
The TopSolid document has to be open, then you run this Macro:

Sub Micos3()
Dim topapp As TopSolid.Application
Dim topdoc As TopSolid.Document

Set topapp = New TopSolid.Application
Set topdoc = topapp.ActiveDocument

topdoc.SetProperty "$NAME", Range(A & "1").Value
topdoc.SetProperty "$QUANTITY", Range(A & "2").Value
...
end sub
Hello
1.I wrote values to macro in excel.
2.I opend setting plan in TS and I wrote value $TOM to cell
3.In Excel has had value in cell: TYP
How is next step?
Attachments
NP.JPG
experiment.JPG

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests