SaveAs with my filename

SaveAs with my filename

Anonymous
Not applicable
494 Views
8 Replies
Message 1 of 9

SaveAs with my filename

Anonymous
Not applicable
hi,
I am required to call the SaveAs dialog with the file name (that I calculate based on some parameters)

I have seen some posts on similar items which say something like
this

Public Sub MySaveAs()
Dim strName As String
Dim Unsupp As AcadUnsupp.Application
Set Unsupp = ThisDrawing.Application.GetInterfaceObject("AcadUnsupp.Application.1")
strName = Unsupp.ShowSaveDialog("Save As", "GantiTesting", "dwg")
ThisDrawing.SaveAs strName
MsgBox "Drawing saved as: " & strName
End Sub

but the problem is
1. I am using AutoCAD 2005 and it does not have (nor support) AcadUnsupp.arx embeded functions

is there a work around, in 2005

any help in this regard would be appriciated
0 Likes
495 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
Public Function SetUnsupp()

Dim strAsdk As String
If AcadVer = 2000 Then
strAsdk = "AsdkUNSUPP2000.Application.1"
Else
strAsdk = "AsdkUNSUPP2004.Application.1"
End If

Set SetUnsupp = Application.GetInterfaceObject(strAsdk)
End Function

Use the AsdkUnsupp2004.arx
Download Unsupp2004Regfor2005.reg (It's on this site) and run that
0 Likes
Message 3 of 9

Anonymous
Not applicable
why not use the windows api saveas dialog?

wrote in message news:[email protected]...
hi,
I am required to call the SaveAs dialog with the file name (that I
calculate based on some parameters)

I have seen some posts on similar items which say something like
this

Public Sub MySaveAs()
Dim strName As String
Dim Unsupp As AcadUnsupp.Application
Set Unsupp =
ThisDrawing.Application.GetInterfaceObject("AcadUnsupp.Application.1")
strName = Unsupp.ShowSaveDialog("Save As", "GantiTesting", "dwg")
ThisDrawing.SaveAs strName
MsgBox "Drawing saved as: " & strName
End Sub

but the problem is
1. I am using AutoCAD 2005 and it does not have (nor support)
AcadUnsupp.arx embeded functions

is there a work around, in 2005

any help in this regard would be appriciated
0 Likes
Message 4 of 9

Anonymous
Not applicable
hi Bob,
How to use the Windows API SaveAs Dialog ?
can you elobrate with an example please
0 Likes
Message 5 of 9

Anonymous
Not applicable
Hi Bryco,
Thanks a lot for the the TIP, it worked

for the benifit of other users using this Post, I would like to inform that the AsdkUnSupp2004.arx and the .reg file is available for download in THIS user group only search for "Unsupp 2004.zip" or with subject of "sendcommand alternatives" around 24th Jan 06

and this was uploaded by By Bryco only, (again thanks a lot Bryco)
0 Likes
Message 6 of 9

Anonymous
Not applicable
Ganti the windows apis are fine but if you like using the unsupp it's a lot easier. Since the api for truecolor isn't there yet the apis don't offer complete access to all the dialogue boxes anyway. I like unsupp it as it's a nice way to use wipeouts in vba.
0 Likes
Message 7 of 9

Anonymous
Not applicable
hi Bryco,
I know it is nice and easy, but the prolem would be when I have to deploy the code on a machine whcih does not have an Administator rights, it is not possible for me to copy the required files on to that machine easily (programatically).

or is there a way that we can store this arx file in the server an let the program acess that file always insted of from the user computer.

besides I would like to know How to prevent the VBA code traveling with the AutoCAD drawing

thanks a lot bryco, you seem to have a lot of patience in answering queires, I am new to VBA programing so all these queires (however I have lot of experience in AutoLISP programing)
never upgraded my knowledge and kept up with the trend anyway better late than never.
0 Likes
Message 8 of 9

Anonymous
Not applicable
ganti look at embed and extract in autocad->tools->macro->vbamanager. You don't want to embed the project in the drawing.
Yes you can leave an arx on the server. But you still have to tell the computer to load it. I think you can use an acad.rx file to do this (similar to startup suite) from the server but the rx file must be pathed in the computers support files.
0 Likes
Message 9 of 9

Anonymous
Not applicable
Hi Bryco,
I forgot to mention, what about the reg edit, that is a must i presume how can i over come that BIG Bottle neck when I will not have acess to edit the registery (as the users will not have administrator rights) through a program ?

thanks for your patience again
ganti
0 Likes