How to get "AutoCAD.Application" object without running full AutoCA

How to get "AutoCAD.Application" object without running full AutoCA

Anonymous
Not applicable
785 Views
12 Replies
Message 1 of 13

How to get "AutoCAD.Application" object without running full AutoCA

Anonymous
Not applicable
I have a standalone VB application in which I need to work with "AutoCAD.Application" object. Note that I use AutoCAD R14. I use following piece of code:

Dim objAcad As Object
Set objAcad = CreateObject("AutoCAD.Application")
...
... some actions
...
objAcad.Quit
Set objAcad = Nothing

This code allows me to work with "AutoCAD.Application" object - it is fine. But every second time the

AutoCAD is running with full interface!!!
Plese help me somebody, I don't want to see AutoCAD window.

Thanks,
mikpet
0 Likes
786 Views
12 Replies
Replies (12)
Message 2 of 13

Anonymous
Not applicable
objAcad.Visible = false 'should also work with R14

- alfred -

In article , mikpet@post.sk says...
> I have a standalone VB application in which I need to work with "AutoCAD.Application" object. Note that I use AutoCAD R14. I use following piece of code:

Dim objAcad As Object

> Set objAcad = CreateObject("AutoCAD.Application")

> ...

> ... some actions

> ...

> objAcad.Quit

> Set objAcad = Nothing

This code allows me to work with "AutoCAD.Application" object - it is fine. But every second time the

AutoCAD is running with full interface!!!

> Plese help me somebody, I don't want to see AutoCAD window.

Thanks,

> mikpet
>

0 Likes
Message 3 of 13

Anonymous
Not applicable
Hm, I have tried this, but Acad window still shows for a moment and then it tries to hide itself, but I have answer a question if I want to "Save changes to drawing.dwg".

How it is possible that sometimes Acad starts as visible and sometimes as hiden when I am creating "AutoCAD.Application" object?

mikpet
0 Likes
Message 4 of 13

Anonymous
Not applicable
i don't know why autocad sometimes shows it's window and sometimes not, so the
way to hide it after CreateObject was a solution for me and i didn't look after
the original purpose of showing up.
does the message to save "drawing.dwg" come up when hiding then application
window or when you open a file?

- alfred -

In article , mikpet@post.sk says...
> Hm, I have tried this, but Acad window still shows for a moment and then it tries to hide itself, but I have answer a question if I want to "Save changes to drawing.dwg".

How it is possible that sometimes Acad starts as visible and sometimes as hiden when I am creating "AutoCAD.Application" object?

mikpet
>

0 Likes
Message 5 of 13

Anonymous
Not applicable
The message is showing up when the Acad is hiding.
0 Likes
Message 6 of 13

Anonymous
Not applicable
sorry, i'm not able to reproduce the message for saving, although i'm running
acad2002, it seems that this is specific to R14 or some part of your
configuration of acad.
as far as i understand autocad i think that the message to save should not
occur with empty, just created drawings. could it be possible that there are
running parallel applications that are reacting on new drawings and set some
defaults (for example like ldt does it)?

- alfred -

In article , mikpet@post.sk says...
> The message is showing up when the Acad is hiding.
>
0 Likes
Message 7 of 13

Anonymous
Not applicable
If I read your original posts correctly, you're trying to hide immediately
after you create your ACAD object -- so I would think you have one empty dwg
open. You could try something like:

Thisdrawing.Close savechanges:=false
objAcad.Visible = false
set newDwg = objAcad.Documents.Add

It's not elegant, but ACAD wouldn't have any reason to prompt for saving,
and the end result would be the same -- 1 empty dwg.
James


"mikpet" wrote in message
news:f12bbb8.1@WebX.maYIadrTaRb...
Hm, I have tried this, but Acad window still shows for a moment and then it
tries to hide itself, but I have answer a question if I want to "Save
changes to drawing.dwg".
How it is possible that sometimes Acad starts as visible and sometimes as
hiden when I am creating "AutoCAD.Application" object?
mikpet
0 Likes
Message 8 of 13

Anonymous
Not applicable
Thanks, guys for your effort.

I found out that the visibility of Acad is controled by a key in the Windows registry:

[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R14.0\ACAD-2452240:46879368\FixedProfile\Application Window]
"Show"=dword:00000001

mikpet
0 Likes
Message 9 of 13

Anonymous
Not applicable
By the way, why my posts are so ugly formatted (without line breaks) even I have written them pretty?

mikpet
0 Likes
Message 10 of 13

Anonymous
Not applicable
the way with setting the registry is tricky, but good.

the format of yours and other mails depends of the options for text-type in
your mail-system. for example in outlook you have the joice to send it as html
or rich-text or plain-text. html and rich-text is on news-readers (mostly
unable to show formating like bold/underline/font-changes) other than outlook-
express like you mentioned.

- alfred -

In article , mikpet@post.sk says...
> By the way, why my posts are so ugly formatted (without line breaks) even I have written them pretty?

mikpet
>

0 Likes
Message 11 of 13

Anonymous
Not applicable
Well, I found out that when I send message to this ng from Outlook Express, the message is displayed as I wrote it, but when I send it through the Autodesk discussion web site, the format is changed.
That's all.

Have a nice day.

mikpet
0 Likes
Message 12 of 13

Anonymous
Not applicable
Just a thought...
if you're going to be rolling this program out to other computers, the ACAD
key might be different if:
- different versions are installed
- multiple ACAD programs, such as Inventor or Mech Desktop, are used

The second one seemed real tricky to me b/c a person could have shortcuts to
both ACAD and MDT, and use either one.

I'm not an expert on this, so you probably have it figured out better than I
... but in my project I was considering using the registry settings, and
then dropped the idea b/c I would have had to figure out which of the
several ACAD keys to change.


"mikpet" wrote in message
news:f12bbb8.6@WebX.maYIadrTaRb...
Thanks, guys for your effort.
I found out that the visibility of Acad is controled by a key in the Windows
registry:
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R14.0\ACAD-2452240:46879368\Fix
edProfile\Application Window]
"Show"=dword:00000001
mikpet
0 Likes
Message 13 of 13

Anonymous
Not applicable
mikpet -

Unfortunately the HTTP web side of the newsgroups is not allowing
carriage returns to show properly. Messages there show as one
long line that just keeps wrapping. This is a known problem and
scheduled for repair.

If you are able to use the NNTP newsgroup reader side of the
newsgroups, carriage returns show properly.

A user, Tony Tanzillo, posted this tip on properly spaced
lines/paragraphs from the HTTP side:

Place your text or code between a pair of PRE /PRE html tags:



Line 1
Line 2
Line 3


---
Anne Brown
Manager, Moderator
Autodesk Product Support discussion groups
Discussion Q&A: http://www.autodesk.com/discussion

mikpet wrote:
>
> By the way, why my posts are so ugly formatted (without line
> breaks) even I have written them pretty?
>
> mikpet
0 Likes