Open LDD
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Open LDD
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
Rad_Cadder
Guest





Posted: Mon Dec 27, 2004 10:36 pm    Post subject: Open LDD Reply with quote

Let me start by saying that I am a newbie to VBA and could use all the help I can get.

I am trying to find out if it would be possible and if so how to setup a routine to launch from the LDD Icon "possibly a DOS Script"? that would check to see if autocad was open and if open, "Alert user" and not open LDD.

I searched previous posts and found a post "is autocad open" and this sounds like a place to start, but I don't know enough about VBA to tell if this will work or if it is possible.

Any help much appreciated!!!

Back to top
Laurie Comerford
Guest





Posted: Tue Dec 28, 2004 1:44 am    Post subject: Re: Open LDD Reply with quote

Hi,

VBA runs from inside a running AutoCAD version.

Hence for your purpose VBA will not be of any use.

You will need to write the program in another language. Due to the help you
can get from the sample files and the published items in this newsgroup, VB
is your best option - but you will have to buy it.

Alternatively use the Microsoft scripting language which is free, and you
certainly will be able to find help on other Internet Newsgroups to do this.

--


Laurie Comerford
CADApps
www.cadapps.com.au


"Rad_Cadder" <nospam@address.withheld> wrote in message
news:21192475.1104168998502.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
Let me start by saying that I am a newbie to VBA and could use all the
help I can get.

I am trying to find out if it would be possible and if so how to setup a
routine to launch from the LDD Icon "possibly a DOS Script"? that would

check to see if autocad was open and if open, "Alert user" and not open LDD.
Quote:

I searched previous posts and found a post "is autocad open" and this
sounds like a place to start, but I don't know enough about VBA to tell if

this will work or if it is possible.
Quote:

Any help much appreciated!!!
Back to top
Rad_Cadder
Guest





Posted: Tue Dec 28, 2004 4:55 am    Post subject: Re: Open LDD Reply with quote

So what you are saying is that it would not be possible to write a DOS script to check the registry for an entry that is only present while autocad is running and if this key is present, run a lisp to alert user???

Back to top
Ed Jobe
Guest





Posted: Tue Dec 28, 2004 5:06 am    Post subject: Re: Open LDD Reply with quote

What's not possible, that I know of, is to stop LDD from loading. Once you
click on the LDD icon, it's going to load. At best you can automatically
close it after it opens. You might be able to make an exe that performs your
checks and then if all is OK, it then starts LDD. But you would have to
change the shortcut to run your app and not LDD. Also, it could be done with
a VB script, not a DOS script and checking the registry only tells you if
the prog is installed, not if its running. For that, you need to use the
GetObject function.

--
----
Ed
----
"Rad_Cadder" <nospam@address.withheld> wrote in message
news:6081432.1104191771825.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
So what you are saying is that it would not be possible to write a DOS
script to check the registry for an entry that is only present while autocad

is running and if this key is present, run a lisp to alert user???
Back to top
Laurie Comerford
Guest





Posted: Tue Dec 28, 2004 5:26 am    Post subject: Re: Open LDD Reply with quote

Hi,

Until you sort out logically what you want to do, nothing is possible.

Think about it:

You have a user who double clicks on the LDD icon. You are now saying that
you want to run a lisp program (which can only run inside AutoCAD) to tell
the user AutoCAD is running.

That may be possible (almost everything is in the programming world if you
can only sort out how), but even if it is, the AutoCAD user who need this
alert will probably not be able to see it if the AutoCAD is minimised so he
can see the LDD icon.

With the MS scripting language, you can certainly detect if an AutoCAD is
running, and if it is display a message with wording along the lines "We
hate training and believe you are incompetent, so have written this program
to tell you that you have AutoCAD running and we don't want you to run Land
Desktop"
If no AutoCAD is running, you would start Land Desktop.

--


Laurie Comerford
CADApps
www.cadapps.com.au


"Rad_Cadder" <nospam@address.withheld> wrote in message
news:6081432.1104191771825.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
So what you are saying is that it would not be possible to write a DOS
script to check the registry for an entry that is only present while autocad

is running and if this key is present, run a lisp to alert user???
Back to top
Rad_Cadder
Guest





Posted: Tue Dec 28, 2004 11:38 pm    Post subject: Re: Open LDD Reply with quote

Laurie,
I was just simply asking for help, or ideas, and wasn't sure if it was even possible.

Maybe you are the only person who has input on this, but I would think that your way is not the only way.

I guess my mistake was to ask for help and then offer any ideas that I might have.

Seems to me that unless you are capable of doing anyting with VB you don't have any business posting here!

Sorry to have wasted your valuable time!
Back to top
Rad_Cadder
Guest





Posted: Tue Dec 28, 2004 11:45 pm    Post subject: Re: Open LDD Reply with quote

My origonal post in LDD forum:

Maybe someone can help!
I need to know if it is possible and if so how would you go about checking to see if autocad was already open when a user double clicks LDD Icon?

And is it possible to stop LDD from loading and overwriting autocad settings?

Your response:

It's far more likely that they are opening drawings by double clicking on
them and this is the source of the problem.

So if you already knew the problem, why didn't you post it
Back to top
Anne Brown
Guest





Posted: Wed Dec 29, 2004 3:19 am    Post subject: Re: Open LDD Reply with quote

Rad -

Laurie is a very experienced user. Please remember that all who
post here are peer to peer and doing this on their own time. You
have to sort through the answers and make them fit your own
circumstances.
---
Anne Brown
Discussion Groups Administrator
Autodesk, Inc.

Rad_Cadder wrote:
(snip)
Quote:

I guess my mistake was to ask for help and then offer any ideas that I might have.

Seems to me that unless you are capable of doing anyting with VB you don't have any business posting here!

Sorry to have wasted your valuable time!
Back to top
Nathan Taylor
Guest





Posted: Wed Dec 29, 2004 3:34 am    Post subject: Re: Open LDD Reply with quote

Is your problem users double clicking drawings or is it users opening another session from a shortcut or is it both.
Regards - Nathan
Back to top
Rad_Cadder
Guest





Posted: Wed Dec 29, 2004 3:42 am    Post subject: Re: Open LDD Reply with quote

The problem is that when our Tech's have autocad open and then open LDD their autocad settings are overwritten by the LDD profile.

Thanx
Back to top
Nathan Taylor
Guest





Posted: Wed Dec 29, 2004 3:59 am    Post subject: Re: Open LDD Reply with quote

Possibly when LDD opens a VBA routine could run that uses the GetObject function to get the first instance of AutoCAD it finds and set the relevant settings. I haven't got LDD so can not verify anything. Possible problems are:
The user might have more than one AutoCAD session open and I am not sure if there is a way to get all sessions.
You need to know all the settings and whether they can be made in VBA.
The VBA routine may be run before the AutoCAD settings have been changed.

Regards - Nathan
Back to top
Rad_Cadder
Guest





Posted: Wed Dec 29, 2004 4:02 am    Post subject: Re: Open LDD Reply with quote

Ed,
I have checked the registry and compared with acad & LDD the following keys are present only while acad is open.

"Validation Policy"=dword:00000003
"Validation Strategy"=dword:00000001

"I believe" This is the registration for our liscence server?
My first thought was that you may be able to create a custom icon and as you say, run a script be it DOS or VB, and check for presence of keys and if not present load LDD.

Like I mentioned before I am new to this aspect of programming, Lisp is as far as I have ventured so I am just searching for "possibilities"
Back to top
Rad_Cadder
Guest





Posted: Wed Dec 29, 2004 4:04 am    Post subject: Re: Open LDD Reply with quote

Nathan,
Thaks for the tip, I have seen previous posts that led me to believe this may be possible.

Thanx
Back to top
Laurie Comerford
Guest





Posted: Wed Dec 29, 2004 4:25 am    Post subject: Re: Open LDD Reply with quote

Hi,

The cure for this problem is training - and if necessary, managerial
sanction.

Programming requires that you are able to totally define your problem and
logically create code to deal with the program.

It has taken you several posts to totally clarify what your problem is, and
you have not been able understand the advise already given.

Your chances of creating a program to do what you want is almost zero unless
you are prepared to devote considerable time and resources.

--

Regards,


Laurie Comerford
www.cadapps.com.au

"Rad_Cadder" <nospam@address.withheld> wrote in message
news:2818684.1104273782888.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
The problem is that when our Tech's have autocad open and then open LDD
their autocad settings are overwritten by the LDD profile.

Thanx
Back to top
Rad_Cadder
Guest





Posted: Wed Dec 29, 2004 4:59 am    Post subject: Re: Open LDD Reply with quote

Laurie,
I would have to agree that training seems like the logical answer, the problem is "people make mistakes".
The problem is our Tech's don't always use Autocad and spend the majority of their time utilizing LDD and yes they do forget to check if autocad is open prior to double clicking the LDD icon.
As for the managerial sanction, I think given the circumstances that's a little over the top. How do you hold someone accountable for creating their own inconvenience?

And although programming requires that you are able to define your problem and create code to deal with it, doesn't mean that everone is prepared or equipped with the knowledge on how to do so. Hence this forum and thousands of others just like it full of people asking for help and insight on what the best way to handle a given circumstance might be.

And once again you may be right, because I have read several posts that implied that it very well may be possible and if I wasn't prepared to devote the time and resources to fix this problem, I would not have posted to begin with.

Thanx - Rob
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB