Visual LISP, AutoLISP and General Customization

Reply
*Morton, Si
Message 1 of 8 (47 Views)

Custom button in 2000

47 Views, 7 Replies
04-12-2000 07:53 AM
I am having problems with a custom button that I have created in Acad 2000

All I want the button todo is open a scpecified DWG file.

My command line reads like this

^C^C open; "D:\filename.dwg"

The command gets as far as opening the "Open" dialogue box.

Any suggestion appreciated...

regards

Simon Morton
*Moore, Ronnie
Message 2 of 8 (47 Views)

Re: Custom button in 2000

04-12-2000 07:58 AM in reply to: *Morton, Si
Try changing the buttons command line to ^C^Copen;"D:\filename.dwg"
No spaces.....
"Si Morton" wrote in message
news:eefe90f.-1@WebX.SaUCah8kaAW...
> I am having problems with a custom button that I have created in Acad 2000
>
> All I want the button todo is open a scpecified DWG file.
>
> My command line reads like this
>
> ^C^C open; "D:\filename.dwg"
>
> The command gets as far as opening the "Open" dialogue box.
>
> Any suggestion appreciated...
>
> regards
>
> Simon Morton
>
*Morton, Si
Message 3 of 8 (47 Views)

Re:

04-12-2000 08:27 AM in reply to: *Morton, Si
Thanks Ronnie, but that didnt work..

Im now trying the following command:

^C^Cfiledia;0;;;open;D:\filename.dwg;

However it gets as far as listing the DWG on the command line but does not
load it ??????

Ronnie Moore wrote in message
news:eefe90f.0@WebX.SaUCah8kaAW...
> Try changing the buttons command line to ^C^Copen;"D:\filename.dwg"
> No spaces.....
> "Si Morton" wrote in message
> news:eefe90f.-1@WebX.SaUCah8kaAW...
> > I am having problems with a custom button that I have created in Acad
2000
> >
> > All I want the button todo is open a scpecified DWG file.
> >
> > My command line reads like this
> >
> > ^C^C open; "D:\filename.dwg"
> >
> > The command gets as far as opening the "Open" dialogue box.
> >
> > Any suggestion appreciated...
> >
> > regards
> >
> > Simon Morton
> >
>
*Moore, Ronnie
Message 4 of 8 (47 Views)

Re:

04-12-2000 08:51 AM in reply to: *Morton, Si
Try ^C^Cfiledia;0;;;open;D:/test.dwg;

"Si Morton" wrote in message
news:eefe90f.1@WebX.SaUCah8kaAW...
> Thanks Ronnie, but that didnt work..
>
> Im now trying the following command:
>
> ^C^Cfiledia;0;;;open;D:\filename.dwg;
>
> However it gets as far as listing the DWG on the command line but does not
> load it ??????
>
> Ronnie Moore wrote in message
> news:eefe90f.0@WebX.SaUCah8kaAW...
> > Try changing the buttons command line to ^C^Copen;"D:\filename.dwg"
> > No spaces.....
> > "Si Morton" wrote in message
> > news:eefe90f.-1@WebX.SaUCah8kaAW...
> > > I am having problems with a custom button that I have created in Acad
> 2000
> > >
> > > All I want the button todo is open a scpecified DWG file.
> > >
> > > My command line reads like this
> > >
> > > ^C^C open; "D:\filename.dwg"
> > >
> > > The command gets as far as opening the "Open" dialogue box.
> > >
> > > Any suggestion appreciated...
> > >
> > > regards
> > >
> > > Simon Morton
> > >
> >
>
*McMahan, Jeremy
Message 5 of 8 (47 Views)

Re: Custom button in 2000

04-12-2000 09:46 AM in reply to: *Morton, Si
Si,

The problem you are running into is probably because of the Multiple Drawing
Environment (MDE) in AutoCAD 2000, the 'open' command has been disabled when
you are not in SDI mode. (See on-line help for further information.)

But, there is a work-around.

By using the 'vbastmt' command you can use the VBA engine to open your
drawing file buy adding your file to the 'documents' collection.

Example: >>>>>>>>>>>>>>
(command "vbastmt" "AcadApplication.Documents.Open \"C:/temp.dwg\"")

Note: Replace "C:/temp.dwg\"' with your fully qualified file name or
variable containing such.

Further Note: If you are using this in a toolbar button, the filename string
you pass may require some tweaking to get the proper 'quoted string' VBA
needs.
<<<<<<<<<<<<<<<<<<<<<

I hope this helps!

Until later,

Jeremy McMahan
Premier Product Support
WW Support & Services, Autodesk
Discussion Q&A: http://www.autodesk.com/discussion

"Si Morton" wrote in message
news:eefe90f.-1@WebX.SaUCah8kaAW...
> I am having problems with a custom button that I have created in Acad 2000
>
> All I want the button todo is open a scpecified DWG file.
>
> My command line reads like this
>
> ^C^C open; "D:\filename.dwg"
>
> The command gets as far as opening the "Open" dialogue box.
>
> Any suggestion appreciated...
>
> regards
>
> Simon Morton
>
*Morton, Si
Message 6 of 8 (47 Views)

Re:

04-13-2000 12:32 AM in reply to: *Morton, Si
Jeremy,

Thanks for your help.

I have tried what you suggested but get the following message on the command
line:

(command "vbastmt" "AcadApplication.Documents.Open

My custom button reads like this:

(command "vbastmt" "AcadApplication.Documents.Open \"D:/FILENAME.DWG\"")

Whats going wrong ???

Thanks in advance

Si

Jeremy McMahan wrote in message
news:eefe90f.3@WebX.SaUCah8kaAW...
> Si,
>
> The problem you are running into is probably because of the Multiple
Drawing
> Environment (MDE) in AutoCAD 2000, the 'open' command has been disabled
when
> you are not in SDI mode. (See on-line help for further information.)
>
> But, there is a work-around.
>
> By using the 'vbastmt' command you can use the VBA engine to open your
> drawing file buy adding your file to the 'documents' collection.
>
> Example: >>>>>>>>>>>>>>
> (command "vbastmt" "AcadApplication.Documents.Open \"C:/temp.dwg\"")
>
> Note: Replace "C:/temp.dwg\"' with your fully qualified file name or
> variable containing such.
>
> Further Note: If you are using this in a toolbar button, the filename
string
> you pass may require some tweaking to get the proper 'quoted string' VBA
> needs.
> <<<<<<<<<<<<<<<<<<<<<
>
> I hope this helps!
>
> Until later,
>
> Jeremy McMahan
> Premier Product Support
> WW Support & Services, Autodesk
> Discussion Q&A: http://www.autodesk.com/discussion
>
> "Si Morton" wrote in message
> news:eefe90f.-1@WebX.SaUCah8kaAW...
> > I am having problems with a custom button that I have created in Acad
2000
> >
> > All I want the button todo is open a scpecified DWG file.
> >
> > My command line reads like this
> >
> > ^C^C open; "D:\filename.dwg"
> >
> > The command gets as far as opening the "Open" dialogue box.
> >
> > Any suggestion appreciated...
> >
> > regards
> >
> > Simon Morton
> >
>
*McMahan, Jeremy
Message 7 of 8 (47 Views)

Re:

04-13-2000 09:25 AM in reply to: *Morton, Si
Si,

If you are trying to open a document with only one document open (allowing
AutoCAD to automatically set the SDI mode...) you can use this syntax:

[^C^C_fileopen;"c:/test.dwg" ] (without the braces.)

If you are trying to open a drawing with several drawings opened already.

[^C^C_vbastmt;AcadApplication.Documents.Open "C:/test.dwg";] (Notice the
Forward slash.)

Hope this works for you!

Until later,

Jeremy McMahan
Premier Product Support
WW Support & Services, Autodesk
Discussion Q&A: http://www.autodesk.com/discussion

"Si Morton" wrote in message
news:eefe90f.4@WebX.SaUCah8kaAW...
> Jeremy,
>
> Thanks for your help.
>
> I have tried what you suggested but get the following message on the
command
> line:
>
> (command "vbastmt" "AcadApplication.Documents.Open
>
> My custom button reads like this:
>
> (command "vbastmt" "AcadApplication.Documents.Open \"D:/FILENAME.DWG\"")
>
> Whats going wrong ???
>
> Thanks in advance
>
> Si
>
> Jeremy McMahan wrote in message
> news:eefe90f.3@WebX.SaUCah8kaAW...
> > Si,
> >
> > The problem you are running into is probably because of the Multiple
> Drawing
> > Environment (MDE) in AutoCAD 2000, the 'open' command has been disabled
> when
> > you are not in SDI mode. (See on-line help for further information.)
> >
> > But, there is a work-around.
> >
> > By using the 'vbastmt' command you can use the VBA engine to open your
> > drawing file buy adding your file to the 'documents' collection.
> >
> > Example: >>>>>>>>>>>>>>
> > (command "vbastmt" "AcadApplication.Documents.Open \"C:/temp.dwg\"")
> >
> > Note: Replace "C:/temp.dwg\"' with your fully qualified file name or
> > variable containing such.
> >
> > Further Note: If you are using this in a toolbar button, the filename
> string
> > you pass may require some tweaking to get the proper 'quoted string' VBA
> > needs.
> > <<<<<<<<<<<<<<<<<<<<<
> >
> > I hope this helps!
> >
> > Until later,
> >
> > Jeremy McMahan
> > Premier Product Support
> > WW Support & Services, Autodesk
> > Discussion Q&A: http://www.autodesk.com/discussion
> >
> > "Si Morton" wrote in message
> > news:eefe90f.-1@WebX.SaUCah8kaAW...
> > > I am having problems with a custom button that I have created in Acad
> 2000
> > >
> > > All I want the button todo is open a scpecified DWG file.
> > >
> > > My command line reads like this
> > >
> > > ^C^C open; "D:\filename.dwg"
> > >
> > > The command gets as far as opening the "Open" dialogue box.
> > >
> > > Any suggestion appreciated...
> > >
> > > regards
> > >
> > > Simon Morton
> > >
> >
>
*S., Eric
Message 8 of 8 (47 Views)

Re:

04-14-2000 11:19 AM in reply to: *Morton, Si
Don't forget-

> [^C^C_fileopen;"c:/test.dwg" ] (without the braces.)

>_fileopen< will not load acad.lsp or acaddoc.lsp so it will have to be
loaded into the newly opened drawing.
--
HTH,
Eric S. eschneider@jensenprecast.com

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community