Author Topic: attach data to object (not block) visible in Properties window  (Read 1426 times)

0 Members and 1 Guest are viewing this topic.

mailmaverick

  • Bull Frog
  • Posts: 493
attach data to object (not block) visible in Properties window
« on: January 17, 2018, 03:28:37 AM »
I know that we can attach attributes to blocks which represent KEY and its VALUE and are visible in Right Click -> Properties window.

But is it possible to attach data / attributes to objects (not blocks) which are visible in Properties window.

I am aware of VLAX-LDATA and other lisp based data storing, but they are not visible in Properties window.

Thanks.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: attach data to object (not block) visible in Properties window
« Reply #1 on: January 17, 2018, 08:06:20 AM »
Using AutoLISP: not as far as I am aware.

As an alternative, you could attach your data in the form of xdata and then either use the XDLIST command (Express Tools), or use either xdata or an extension dictionary and create your own dialog to view the stored data.

Personally, I would avoid the use of ldata, as others have previously reported this to have the potential to corrupt drawings.

jvillarreal

  • Bull Frog
  • Posts: 332
Re: attach data to object (not block) visible in Properties window
« Reply #2 on: January 17, 2018, 09:52:19 AM »
If you're using AutoCAD Map or Civil 3d, you could attach 'object data'.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: attach data to object (not block) visible in Properties window
« Reply #3 on: January 17, 2018, 10:32:43 AM »
Using LISP, you're limited to a modal dialog or command-line output to display content.  When done right, it's not too big of a deal e.g. not expecting the user to verbosely inspect every.single.item in the drawing one at a time.

Using dotNET you can create a modeless palette similar to the Properties palette.  If I remember correctly, you need to use ObjectARX to modify the Properties palette, and then you're still restricted to what it can do.  Better to build your own interface, possibly a more generic version which can be used like an enhanced version of the OOTB one that can also be easily inherited to something more specific.

And I agree with Lee Mac, LDATA is a little quirky for extensive use.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}