Page 1 of 1

User informations

Posted: Fri Apr 24, 2009 9:22 am
by paul-ince
Hi!
It is possible to import User informations (menu: "file->properties->User informations") from a file to another one?

Posted: Mon May 25, 2009 10:04 am
by paul-ince
I did it!
I used a simple program made in vba from excel!!
It works!

Posted: Wed May 27, 2009 11:52 am
by micos3
Hi.

Can u post the VBA code u use?

Thanks

Posted: Wed May 27, 2009 4:38 pm
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

Posted: Thu Feb 24, 2011 7:27 am
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?