Author Topic: IP adress  (Read 2342 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2360
IP adress
« on: July 29, 2004, 12:28:06 PM »
is there a way to obtain a IP adress via LISP ?

i know i can with Doslib... but i'm trying to find another way..



thanks.
Keep smile...

Mark

  • Custom Title
  • Seagull
  • Posts: 28685
IP adress
« Reply #1 on: July 29, 2004, 12:36:41 PM »
sounds kind of ........... fishy :D
what are you up there Andrea ??
TheSwamp.org  (serving the CAD community since 2003)

Andrea

  • Water Moccasin
  • Posts: 2360
IP adress
« Reply #2 on: July 29, 2004, 08:40:39 PM »
AutoCAD chat tools for users
and video sharing for AutoCAD between users
in different office....


I need to do it with IP address.
and not via network.


any help ?
Keep smile...

sinc

  • Guest
IP adress
« Reply #3 on: July 29, 2004, 09:43:28 PM »
I don't know of a way to do it directly in Lisp, but I'm still pretty new to this environment...

Some possibilities to consider, if all else fails:

Autocad can talk to other programs that use ActiveX.  You might be able to figure out a solution where Autocad uses this ability to ask another program for the IP address.  (Check out the example on talking to Excel in the help - search for "interact with other applications".)  Or you might be able to do it with a VBA module added to your code.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16722
  • Superior Stupidity at its best
IP adress
« Reply #4 on: July 29, 2004, 11:51:32 PM »
I don't think you can do it directly in lisp, you can however use a few API calls to return it, but as I am not always ready to accept defeat just because someone says it can't be done.....

You could look at importing the API import function into VLisp, then perhaps using that to import API calls into the VLisp environment,  once you do that you can call the wsock32.dll directly using the API call and retrieve the IP address there...it is a long shot, possibly lots of coding, merging VBA, C++, VLisp and lisp into a single program....sounds complicated...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Andrea

  • Water Moccasin
  • Posts: 2360
IP adress
« Reply #5 on: July 29, 2004, 11:58:55 PM »
ah !!   8)

sorry to tell you this....but it's work !!
i already do it....but for the moment i use Doslib
and i just need to know how to obtain the IP without Doslib.

 :wink:
Keep smile...

MP

  • Seagull
  • Posts: 17454
IP adress
« Reply #6 on: July 30, 2004, 12:09:48 AM »
Using VB there's this, this, this or this for starters. :)
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16722
  • Superior Stupidity at its best
IP adress
« Reply #7 on: July 30, 2004, 02:10:47 PM »
As I said before, there is no direct LISP way to obtain an IP address, there are many ways to do it using non-lisp programs such as the DOSLib program (which is not a lisp interface). You can use VB(a) to obtain the IP by using API functions .. if you want a work around to obtaining it, you can use the ipconfig utility built into windows by redirecting the output to a file, then reading and parsing that file with lisp...

Example ...

ipconfig.exe > ip.txt
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Andrea

  • Water Moccasin
  • Posts: 2360
IP adress
« Reply #8 on: August 01, 2004, 10:37:24 PM »
ok keith,

thanks for all. :wink:
Keep smile...

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9268
IP adress
« Reply #9 on: August 01, 2004, 11:39:12 PM »
My question is why this thread isnt in the lisp forum?

*Bump!*
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--