amviewout

amviewout

Anonymous
Not applicable
172 Views
1 Reply
Message 1 of 2

amviewout

Anonymous
Not applicable
Does anyone know how to export all layouts from a MDT drawing to single
drawings. I've tryed with SendCommand but it wouldn't work when I use it in
a batch vhere I use script.


This is the script file.


open "c:\drawing\d1.dwg" qsave close
open "c:\drawing\d2.dwg" qsave close
open "c:\drawing\d3.dwg" qsave close
open "c:\drawing\d4.dwg" qsave close

I call the vba macro and it works fine, but not with the script file.

When I use the sendcommand and "-amviewout" the program doesn't execute the
sendcommand.
So How can I do it from VBA without using the SendCommand.

I've seen the object tree in Autodesk McadAuto 2.0 Type Library, but I
can't find the command for "Amviewout".

Here is the code that I want to replace so I don'r need to use SendCommand

ThisDrawing.SendCommand "-amviewout" & vbCr & vbCr & vbCr & Chr(34) & filen
& Chr(34) & vbCr

(the "filen" is the name of the file)

thanks

Henrik
0 Likes
173 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Hi Henrik,

The script and VBA statement below both work for me in MDT 6.
Please note that the VBA is using " " (blank spaces) instead of vbcr. I
don't know why it will not work using vbcr

You may also want to take a look at the "vbastmt" command which will work in
a script file.

HTH,

Gary

filedia
0
-amviewout



C:\Temp\Expviews.dwg

ThisDrawing.SetVariable "filedia", 0
ThisDrawing.SendCommand ("-amviewout" & " " & " " & " " &
"C:\Temp\Expviews.dwg" & " ")
0 Likes