Author Topic: Just for fun. Make a dialog box of all editable properties per object.  (Read 23727 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5251
I have this code working.  The problem now is that it isn't grabbing all the information for blocks.  It is leaving out the scale values, and I'm not sure why.  The way the code works, because it's the only way I found out how to do it, is once you pick and object, it prints to the command line the properties via (vlax-dump-object.... ).  But before that, it tells acad that it wants to keep up the log file, this is how I grab all the properties.  If anyone knows a better way, I'm all ears.  I will post the file because the code looks pretty nasty.

Any help is appreciated. Thanks in advance.  And Happy Holidays to All.
Tim

ps.  I couldn't get the while to loop right, that is why it is commented out in the code.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #1 on: December 23, 2005, 07:51:06 PM »
You mean something like this?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #2 on: December 24, 2005, 04:54:43 AM »
Yea.  That looks like what I was trying to do (but a whole lot nicer).  Can you tell me how you got there?  If not I understand.  Maybe a hint then.  The way I'm doing it is not the best, and your looks a lot better.  I don't know if I can dl and use a fas at work.  Then don't want me doing stuff like that.

Thanks.
Tim
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #3 on: December 24, 2005, 07:58:06 AM »
Hint: I walk the atoms family, pulling out properties / methods as available / applicable for the object selected.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

nivuahc

  • Guest
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #4 on: December 24, 2005, 08:04:56 AM »
<Lurch> You raaaang? </Lurch>

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #5 on: December 24, 2005, 08:23:34 AM »
<Lurch> You raaaang? </Lurch>

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

nivuahc

  • Guest
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #6 on: December 24, 2005, 08:29:45 AM »
Hint: I walk the atoms family...

Maybe I'm showing my age

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #7 on: December 24, 2005, 08:36:57 AM »
Dang, that's funny Chuck, I'm embarrassed I needed 'splainin'. I remember the original too.  :oops:

There was a point as kids when we were referred to as "Cousin Its" because of the long hair thang (gone now).
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

nivuahc

  • Guest
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #8 on: December 24, 2005, 08:41:00 AM »
That's funny, my Mom always called me Fester

I think it had something to do with my bathing habits (or lack thereof).

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #9 on: December 24, 2005, 08:44:31 AM »
Let me guess, your feet smelled like cheese.

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

nivuahc

  • Guest
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #10 on: December 24, 2005, 08:47:10 AM »
Limburger  :oops:

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #11 on: December 24, 2005, 04:42:01 PM »
Hint: I walk the atoms family, pulling out properties / methods as available / applicable for the object selected.
Thanks Michael.  I will work on this one Tuesday when I get back to work and Acad.  I have not worked at all with atoms, so this will be a good learning experience.

Hope everyone gets what they want from the Holidays.
Tim
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #12 on: December 24, 2005, 07:59:33 PM »
Hi Tim, these snips may prove useful --

GetVlaAtoms

Code: [Select]
(defun GetVlaAtoms ( )
    (vl-remove-if-not
       '(lambda (symbol)   
            (wcmatch
                (vl-symbol-name symbol)
                "vla-*"
            )
        )
        (atoms-family 0)
    )
)

GetVlaProperties

Code: [Select]
(defun GetVlaProperties ( atoms )
    (vl-sort
        (mapcar
           '(lambda (symbolname) (substr symbolname 9))
            (vl-remove-if-not
               '(lambda (symbolname)   
                    (wcmatch
                        symbolname
                        "vla-get-*" ;; don't need 'put'
                    )
                )
                (mapcar 'vl-symbol-name atoms)
            )
        )
        '<
    )   
)

GetVlaMethods

Code: [Select]
(defun GetVlaMethods ( atoms )
    (vl-sort
        (mapcar
           '(lambda (symbolname) (substr symbolname 5))
            (vl-remove-if
               '(lambda (symbolname)   
                    (wcmatch
                        symbolname
                        "vla-get-*,vla-put-*" ;; need 'put'
                    )
                )
                (mapcar 'vl-symbol-name atoms)
            )
        )   
       '<
    )   
)

Use GetVlaAtoms to get the initial susbset of vla-* atoms, then pass said subset to GetVlaProperties and GetVlaMethods to get the properties and methods respectively (as opposed to multiple atoms-family calls which would be somewhat less efficient).

Another note: You may think GetVlaProperties and GetVlaMethods are the same, but they're not -- note the use of vl-remove-if-not and vl-remove-if respectively and the filtering arguments employed. I know they both could have been written generically as one function that takes more arguments but I didn't see the need as they'd only be used these two ways.

Sorry for the bla bla bla part, can't help myself.
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: Just for fun. Make a dialog box of all editable properties per object.
« Reply #13 on: December 26, 2005, 08:36:34 AM »
Tim

Take a look at this one by Michael Puckett.

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

GDF

  • Water Moccasin
  • Posts: 2081
Re: Just for fun. Make a dialog box of all editable properties per object.
« Reply #14 on: December 26, 2005, 10:04:05 AM »
Tim

Really like your test version. I didn't realize that you could modify the properties with it, upon my first test.
Can't wait for your next version.

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