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, jacs, Daniel

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

User informations

Unread post by paul-ince »

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

Unread post by paul-ince »

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

Unread post by micos3 »

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

Unread post by paul-ince »

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

Unread post by kotlas »

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