Author Topic: ActiveX Help for LISPin' folks ...  (Read 18070 times)

0 Members and 1 Guest are viewing this topic.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« on: May 15, 2005, 11:58:10 AM »
Responding to a challenge in this thread (thanks Chuck!) I wrote AxProps (use your logon name / password to download), a little utility that provides a simple gui interface to display all the properties and methods exposed to AutoLISP (via vla-*, vlax-get/put/invoke etc.) for a specified entity or object --



Double clicking an entry in the dialog will invoke the help system and display the appropriate help (if a topic for that item exists) --





Finally, when there is a difference in the result returned by vlax-get and vlax-get-property (the former generally returning data types native to AutoLISP, the latter data types native to ActiveX), it shows both results separate by a " | " (pipe) symbol --



Download --

AxProps.fas (use your logon name / password).

Command / Functions --

c:AxProps -- prompts you to to select an entity.
c:NAxProps -- prompts you to to select a nested entity.
AxProps, syntax: (AxProps x), where x is any valid object, ename or handle.

Feel crazy? Try this (axprops "1"). :lol:

I plan to add the ability to dump the whole mess to notepad so you can use the info in other ways, print off etc. Other ideas welcome, will try to incorporate ideas keeping with it's simple philosophy and lightweight footprint when I've the time.

Final note: I wrote this quick under Windows XP Pro and vanilla AutoCAD 2006. When this crashes on your system please provide the noted information, you'll be helping me out a lot. Thanks.

Enjoy.

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

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
ActiveX Help for LISPin' folks ...
« Reply #1 on: May 15, 2005, 12:20:39 PM »
Can't wait till Monday morning so I can try it out. Look's mighty nice there MP.
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #2 on: May 15, 2005, 12:27:56 PM »
Thank you Mr. Thomas.

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

nivuahc

  • Guest
ActiveX Help for LISPin' folks ...
« Reply #3 on: May 15, 2005, 12:57:33 PM »
Kudos to you Mr. Puckett!

This will be a tremendous help to me, and many others.

:dood:

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #4 on: May 15, 2005, 01:01:20 PM »
My pleasure Chuck, thank you for the idea.

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

nivuahc

  • Guest
ActiveX Help for LISPin' folks ...
« Reply #5 on: May 15, 2005, 01:09:41 PM »
Question for you... what are your terms of distribution on this gem? Am I free to share it with whomever I like? I honestly believe that something like this would make great shareware and that there are many people who would be willing to pay a small fee to use it (myself included). I think I know what your response to that will be but, for the benefit of others, would you care to elaborate a little?

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #6 on: May 15, 2005, 03:43:15 PM »
I desire no fee; freeware for everyone. You may distribute as you please so long as there is no fee involved, that is: you may not charge anyone for its use or distribution, nor may you include it in distributions that are fee based. Despite trivial coding it's copyrighted (as noted on loading and invocation); you may not modify, reverse engineer or decompile it.

Clear as mud?

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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
ActiveX Help for LISPin' folks ...
« Reply #7 on: May 15, 2005, 04:43:13 PM »
Awesome routine you have there Michael. :shock:

Using ACAD2000 windows 2000
Code: [Select]
Command: _appload axprops.fas successfully loaded.


Command: AxPROPS.FAS 1.0 (© 2005 Michael Puckett).
Function: (AxProps x), where x is a valid ename, object or handle.
Commands: AxPROPS/nAxPROPS. Prompt (entsel/nentsel) for primary/nested entity.
Command:
Command: (axprops "1")
; error: bad argument type: stringp nil

Command: C:axprops
Unknown command "C:AXPROPS".  Press F1 for help.

Command: axprops

Select object: ; error: bad argument type: stringp nil

Command:


The initial dialog box comes up, but
When double clicking on an item, like Layer
I get the error. Select object: ; error: bad argument type: stringp nil
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
ActiveX Help for LISPin' folks ...
« Reply #8 on: May 15, 2005, 05:14:56 PM »
Command: (axprops "1")
Command: (axprops "2")
Command: (axprops "3")

Do what "I think" they are s'posed to.

Thanks again Michael for sharing.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #9 on: May 15, 2005, 05:19:41 PM »
Hi Alan, what does this

(setq helpfile (findfile "acadauto.chm"))

return on your system?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #10 on: May 15, 2005, 05:22:47 PM »
My pleasure Kerry.

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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
ActiveX Help for LISPin' folks ...
« Reply #11 on: May 15, 2005, 05:27:01 PM »
(setq helpfile (findfile "acadauto.chm"))
nil

I have acadauto.hlp with ACAD2000
no chm except for acet.chm
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #12 on: May 15, 2005, 05:32:05 PM »
Exactly what I thought, that what's making this utility toss a wobbly, it's designed to work on systems with the chm style help. Hmmm, can you send me your help file? I'll see what I can do.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #13 on: May 15, 2005, 05:44:01 PM »
Until I code alternately using AcadAuto.hlp (wild assumption that I can) I've recoded the program to deal with the failure to locate AcadAuto.chm more elegantly. I've uploaded the new version (read: "please download new version").

AxProps.fas (use your logon name / password).

Gotta head out in about 5 minutes, but I'll be back later tonight.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

nivuahc

  • Guest
ActiveX Help for LISPin' folks ...
« Reply #14 on: May 15, 2005, 06:17:17 PM »
Quote from: MP
I desire no fee; freeware for everyone. You may distribute as you please so long as there is no fee involved, that is: you may not charge anyone for its use or distribution, nor may you include it in distributions that are fee based. Despite trivial coding it's copyrighted (as noted on loading and invocation); you may not modify, reverse engineer or decompile it.

Clear as mud?

:)


Just about exactly what I thought you would say. :keb:

You know, I'm completely amazed by this tool you've written. It's one of those things that, once you see and use it, you wonder why the folks at Autodesk never thought of including something exactly like it in AutoCAD in the first place. Am I the only one who feels that way? :|  

What a time/confusion/headache saver! :D

nivuahc

  • Guest
ActiveX Help for LISPin' folks ...
« Reply #15 on: May 15, 2005, 06:19:12 PM »
I'm reminded of those commercials for Guinness beer...

Quote from: Guinness Beer Guy
Brilliant!

nivuahc

  • Guest
ActiveX Help for LISPin' folks ...
« Reply #16 on: May 16, 2005, 08:20:46 AM »
Just tested it on Vanilla 2002 and it works perfectly!

:)

Thanks again Michael!

Crank

  • Water Moccasin
  • Posts: 1503
ActiveX Help for LISPin' folks ...
« Reply #17 on: May 16, 2005, 09:33:09 AM »
Thanks Michael, this makes life a lot easier!

2 questions:
  • Can you add getkword to choose between AxPROPS and nAxPROPS?
  • If there is already a helpscreen in the background, is it possible then to use that window?[/list:u]
Vault Professional 2023     +     AEC Collection

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #18 on: May 16, 2005, 10:27:01 AM »
Quote from: Crank
Thanks Michael, this makes life a lot easier!

My pleasure, hope it helps you along your journey. :)

Quote from: Crank
Can you add getkword to choose between AxPROPS and nAxPROPS?

I'd rather not, but then again, maybe you're not the only one who wants this. Is it the naming that bugs you, like would you prefer AxPropsX for the nested version? Notwithstanding, there's nothing stopping you from calling (AxProps x) anyway you want via your own wrapper, including exactly as you described.

Quote from: Crank
If there is already a helpscreen in the background, is it possible then to use that window?

I could, but <guessing> it would not immediately receive focus. Also, I thought folks might want to have independent windows for subsequent help screens.

You guys indicate what you want, I'll try to respond to the majority.

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

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #19 on: May 16, 2005, 11:50:39 AM »
Please note that I found a bug in the program this morning. It crashes on PolyLines. The fix is easy, but I don't have the source code here, so I'll fix it up when I get home tonight.

Also, regarding Crank's request consider this quick one off:

Code: [Select]
(defun c:Propsx ( / mia getkey key lst )

    (cond
   
        (   (and
                (setq mia (null AxProps))
                (null (findfile "axprops.fas"))
            )
            (princ "Cannot find axprops.fas, aborting.")
        )    
       
        (   (and
                mia
                (eq 'failed (load "axprops.fas"))
            )
            (princ "Cannot load axprops.fas, aborting.")
        )
       
        (   (defun GetKey ( / result )
                (while
                    (null
                        (eq 2
                            (car
                                (setq result (grread))
                            )
                        )
                    )
                )
                (cadr result)
            )

            (setq lst
                (mapcar 'ascii
                   '("p" "P" "n" "N" "\r" " ")
                )
            )
           
            (if mia (princ "\n\n"))

            (princ
                (strcat
                    "Press [p] or [enter] to select a "
                    "primary entity, [n] for a nested one: "
                )    
            )

            (while
                (null
                    (member
                        (setq key (GetKey))
                        lst
                    )
                )    
            )

            (setq ename
                (car
                    (if (member key (mapcar 'ascii '("n" "N")))
                        (nentsel)
                        (entsel)
                    )
                )
            )
           
            (vl-load-com)

            (AxProps ename)
        )
    )    

    (princ)
   
)


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

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
ActiveX Help for LISPin' folks ...
« Reply #20 on: May 16, 2005, 09:23:52 PM »
Bug squished, please download latest version.

AxProps.fas (use your logon name / password).

Altered presentation of data slightly, I'll let you find the change.

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

DEVITG

  • Bull Frog
  • Posts: 479
Re: ActiveX Help for LISPin' folks ...
« Reply #21 on: December 25, 2005, 09:19:56 AM »
Hi Michael , just one of the best gift on my chrismas tree.
Thanks
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ActiveX Help for LISPin' folks ...
« Reply #22 on: December 26, 2005, 01:55:12 AM »
Waaaaat the ... well, thanks DEVITG, right nice of you to say so ... thanks!

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

GDF

  • Water Moccasin
  • Posts: 2081
Re: ActiveX Help for LISPin' folks ...
« Reply #23 on: December 26, 2005, 08:54:02 AM »
Thanks

Thank you Michael. I like it as much as you ATOMS.vlx routine. I think the people at Autodesk would make use of this.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ActiveX Help for LISPin' folks ...
« Reply #24 on: December 26, 2005, 10:35:25 AM »
Thanks Gary! lol, it seems like a lifetime ago when I wrote atoms, I kinda forgot about it.

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

Joe Burke

  • Guest
Re: ActiveX Help for LISPin' folks ...
« Reply #25 on: December 30, 2005, 05:14:57 AM »
Very nice, Michael. Thank you.   :-)

A couple cosmetic questions. Could the window be resizable? Likewise, recall its last location and size?

On my two monitor setup the window always appears centered on the drawing window monitor, regardless of where it was when last closed. I'd prefer to have it on the other monitor so it doesn't obscure the drawing.

Forgive me if this is nit-picking.

77077

  • Guest
Re: ActiveX Help for LISPin' folks ...
« Reply #26 on: June 05, 2015, 12:06:35 AM »
Thanks for sharing .
where is the Atoms.vlx ?


Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ActiveX Help for LISPin' folks ...
« Reply #27 on: June 05, 2015, 11:13:21 PM »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

77077

  • Guest
Re: ActiveX Help for LISPin' folks ...
« Reply #28 on: June 05, 2015, 11:24:53 PM »