Code Red > AutoLISP (Vanilla / Visual)

type libraries

(1/4) > >>

daron:
Is it possible to take the functions we have made and put them in a type library, so when writing new routines that use these they'll turn blue, or whatever color your built in functions turn when you type them out?

JohnK:
In the VLIDE? I seriously doubt it. In any other text editor, yes.

daron:
Okay, so how would you create one? I'd like to try it in the vlide after one is created. I would assume it's like any other tlb. As soon as it's imported, it should work. I did the funniest thing yesterday that made me think of it. I did this (vlax-import-type-library :tlb-filename "axdb15") and it turned things like Item and Freeze and ActiveDocument, blue. I didn't need to put vla in front of them at all. Not what I expected, but it re-spawned an old idea.

JohnK:
Dude your nuts! I havent the slightest idea how to create a type lib. Well i supose you could create it in VB6 but i dont know how.  (Ill see if i can find any info for ya)

...I swear, one of these days im going to help you set up VIM. (A better text editor. Youll never look back.) Everything is a text file and quick as shit. Any functions i want added, all i have to do is add those function names to a file and VIM colors them for me.  (in any color i want.)

Kerry B:
for Sybbol protection & colouring in the VL IDE you could use something like this :-


--- Code: ---
;;;-----------------------------------------------------------------------------------
;;;-----------------------------------------------------------------------------------
(vl-load-com)
(setq *temp-symbols* '(kpsl_savesysvar kpsl_on_error
      kpsl_ptos kpsl_dtr
      kpsl_rtd kpsl_deflection
      kpsl_midpoint kpsl_getpoint
      kpsl_getint kpsl_entsel
      c:testarcdim
     )
)
(eval (list 'pragma
   (list 'quote (list (cons 'unprotect-assign *temp-symbols*)))
      )
)
;;;-----------------------------------------------------------------------------------
;;;-----------------------------------------------------------------------------------
;; add the defuns here < snip >

;;;-----------------------------------------------------------------------------------
;;;-----------------------------------------------------------------------------------
(eval
  (list 'pragma (list 'quote (list (cons 'protect-assign *temp-symbols*))))
)
(setq *temp-symbols* nil)



--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version