TheSwamp
Code Red => VB(A) => Topic started by: ImaJayhawk 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
-
Abbreviated -
(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.
-
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.
-
Note to self: have coffee before starting to post. I saw template, not template dwg, and assumed the poster just meant their startup lisp.
:)
-
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.)
-
eeewww that would not be a smart thing to do....
-
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
-
use this scenario:
ACADApplication.LoadArx("WhoHax.arx")
-
Thanks
--ImaJayhawk :D