Author Topic: how can I? or is this possible?  (Read 7895 times)

0 Members and 1 Guest are viewing this topic.

raresp

  • Guest
how can I? or is this possible?
« on: October 15, 2003, 09:22:09 AM »
Is it possible to have a block with att nested in a block with att and access (and change) the first blocks attributes using lisp.
I'm trying to find a kind of protection (in my sanarea lisp routine)  for those attributes that keep handles. If they are invisible they still can be accessed.
Do you have any suggestion how to protect those attributes???
Or can I creeate an unnamed block with attributes? is this possible??
The user shouldn't have access to those attributes at all.
I don't know if it's clear enough what I'm trying to do :-(

SMadsen

  • Guest
how can I? or is this possible?
« Reply #1 on: October 15, 2003, 09:43:24 AM »
Just some loose thoughts...

There are a few ways to make information inaccessible to the standard user. I don't know if your scheme with att's within a nested block is the way to go but I don't see it should be a problem technically.

Have you thought about xdata? You could add xdata to the insert or even to the individual attribute(s). Xdata have a small problem with verification of handles but it can be overcomed.

There are also dictionaries. They are very suited to hold references to entities. They update automatically and it's easy to test if they've gone out of scope. The "only" problems are that they are easily accessed by the a-little-more-than-standard user and they don't get transferred when wblock'ing (if that should ever pose a problem).

Dictionaries can be held by the drawing itself or by individual entities so it's even possible to attach a dictionary to an attribute. For easy setup I would prefer the drawing, though.

raresp

  • Guest
how can I? or is this possible?
« Reply #2 on: October 15, 2003, 09:49:30 AM »
Ohhhh.... of course Xdata is applicable to me.. thanks a lot for pointing me on right direction
do you know a good tutorial about dictionaries??

SMadsen

  • Guest
how can I? or is this possible?
« Reply #3 on: October 15, 2003, 09:59:58 AM »
More thoughts ...

I once wrote an automatic area updating routine for a client (not the Roomarea.lsp thing) that uses dictionaries for holding information. It's very versatile and can hold many areas at once. It can also hold areas that are subtracted from the total area along with the entities that present the area to the user. It also holds different settings such as: should the text be updated? Should the text move with the area? In that case, which area should it follow? Should it rotate in different views?

All in all, dictionaries offer a series of possibilities and they are quite easy to work with.

SMadsen

  • Guest
how can I? or is this possible?
« Reply #4 on: October 15, 2003, 10:04:21 AM »
www.afralisp.com should have some tutors concerning dictionaries.

daron

  • Guest
how can I? or is this possible?
« Reply #5 on: October 15, 2003, 10:06:49 AM »
Quote from: raresp
do you know a good tutorial about dictionaries??
Kenny's web site has many tutorials.

raresp

  • Guest
how can I? or is this possible?
« Reply #6 on: October 15, 2003, 10:09:29 AM »
Thanks, I'm checking the website as we speak. Your routine sounds very powerfull...but I really don't need something as powerfull as yours...I'm wondering if they will used it ever even so

SMadsen

  • Guest
how can I? or is this possible?
« Reply #7 on: October 15, 2003, 10:46:37 AM »
To tell you the truth, I use an extended version of the Roomarea.lsp myself - I don't like automatic updating and have no use yet for multiple areas (that was a demand from the client) - but I'm only myself. Actually the only person out of 700 employees that use AutoCAD!.
I can see your problem with users nosing into the attribute that holds handles. They will think, "A4D30F? What's that nonsense?!" and delete it or replace it with their initials or stuff.

If that was my problem, I would use xdata or dictionaries.

raresp

  • Guest
how can I? or is this possible?
« Reply #8 on: October 15, 2003, 11:10:44 AM »
thanks again.. I'll use xdata...:-)