Code Red > VB(A)

WhoHas

(1/2) > >>

ImaJayhawk:
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:
Abbreviated -


--- Code: ---(if
    (null
        (member
            (setq app "WHOHAS.ARX")
            (mapcar 'strcase (arx))
        )
    )
    (arxload app)
)
--- End code ---

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.

Keith™:
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.

MP:
Note to self: have coffee before starting to post. I saw template, not template dwg, and assumed the poster just meant their startup lisp.

:)

JohnK:
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.)

Navigation

[0] Message Index

[#] Next page

Go to full version