Author Topic: WhoHas  (Read 2600 times)

0 Members and 2 Guests are viewing this topic.

ImaJayhawk

  • Guest
WhoHas
« on: September 02, 2004, 10:52:19 AM »
Is there a way to add some code to a template drawing that will check to see if the person opening the drawing has the WhoHas.arx loaded?  And if not attempt to load it?

Thanks.


--ImaJayhawk

MP

  • Seagull
  • Posts: 17470
WhoHas
« Reply #1 on: September 02, 2004, 11:12:11 AM »
Abbreviated -

Code: [Select]
(if
    (null
        (member
            (setq app "WHOHAS.ARX")
            (mapcar 'strcase (arx))
        )
    )
    (arxload app)
)

This assumes whohas.arx is a legitimate app in the support path. You may need to add add'l code to make this bullet proof.
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16723
  • Superior Stupidity at its best
WhoHas
« Reply #2 on: September 02, 2004, 11:51:02 AM »
MP, that lisp must be loaded each time to make it effective and if you load it on every drawing, it does not meet the criteria to load when a certain template is used.

You can create a VBA application, and embed the macro in the drawing file using the VBA manager.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

MP

  • Seagull
  • Posts: 17470
WhoHas
« Reply #3 on: September 02, 2004, 11:56:39 AM »
Note to self: have coffee before starting to post. I saw template, not template dwg, and assumed the poster just meant their startup lisp.

:)
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9275
WhoHas
« Reply #4 on: September 02, 2004, 12:51:25 PM »
No thats cool MP; You can use that code. Use a Persistant reactor. (Although i highly recomend you dont, but you could if you were brave.)
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16723
  • Superior Stupidity at its best
WhoHas
« Reply #5 on: September 02, 2004, 02:19:07 PM »
eeewww that would not be a smart thing to do....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

ImaJayhawk

  • Guest
WhoHas
« Reply #6 on: September 02, 2004, 04:39:18 PM »
Looks like embedding is the way to go.  It's been a while since I've done any VB can someone give me a bump in the right direction for loading the arx.  Thanks.


--ImaJayhawk

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16723
  • Superior Stupidity at its best
WhoHas
« Reply #7 on: September 02, 2004, 06:46:23 PM »
use this scenario:
Code: [Select]

ACADApplication.LoadArx("WhoHax.arx")
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

ImaJayhawk

  • Guest
WhoHas
« Reply #8 on: September 03, 2004, 09:23:39 AM »
Thanks  


--ImaJayhawk :D