copy layout

copy layout

Anonymous
Not applicable
378 Views
2 Replies
Message 1 of 3

copy layout

Anonymous
Not applicable
Hi everyone,
In a drawing i have a layout "Lot_1"
I want copy it in "Lot_2", "Lot_3" ....
My code :

On Error Resume Next
Set presentation_existante = ThisDrawing.Layouts("Lot_1")
If Err Then
MsgBox "La présentation ""Lot_1"" n'existe pas"
Else
For i = 2 To nombre_lots
Set nouvelle_presentation = ThisDrawing.Layouts.Add("Lot_" & i)
nouvelle_presentation.CopyFrom presentation_existante
Next
End If

After, the news layouts "Lot_2", Lot_3" .... exists but the mviews from
"Lot_1" are not in them
Thank for your help
--
Bernard Flavignard
France
www.guidonchalettois.fr
0 Likes
379 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Save your drawing once as template to C:\Templates\Lot.dwt and create the folowing cmdbuttons on your toolpalette:
^c^c-filedia;0;-layout;t;"C:/Templates/Lot.dwt";"Lot_2";filedia;1;
and
^c^c-filedia;0;-layout;t;"C:/Templates/Lot.dwt";"Lot_3";filedia;1;
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thank, but it is not with VBA.
I found solution.
--
Bernard Flavignard
www.guidonchalettois.fr
a écrit dans le message de news:
5756675@discussion.autodesk.com...
Save your drawing once as template to C:\Templates\Lot.dwt and create the
folowing cmdbuttons on your toolpalette:
^c^c-filedia;0;-layout;t;"C:/Templates/Lot.dwt";"Lot_2";filedia;1;
and
^c^c-filedia;0;-layout;t;"C:/Templates/Lot.dwt";"Lot_3";filedia;1;
0 Likes