Author Topic: WhoHas  (Read 5698 times)

0 Members and 1 Guest 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: 17750
  • Have thousands of dwgs to process? Contact me.
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.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • 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

Find me on https://parler.com @kblackie

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
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.

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10595
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.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • 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

Find me on https://parler.com @kblackie

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: 16899
  • 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

Find me on https://parler.com @kblackie

ImaJayhawk

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


--ImaJayhawk :D