Author Topic: extracting value of attribute in current visibility state only using lisp  (Read 4874 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
Hey guys,

It's been far too long since I've been here. I have a question regarding how to extract the value of an attribute in current visibility state only for blocks which contain multiple states with an attribute in each using lisp. We have an existing routine which extracts attribute values to a database that we are trying to update to work for Dynamic Blocks. I am just looking for the method in lisp by which you say get the current visibility state then extract the attribute value within this state only. See the attached drawing which spells it out a little better. Thanks for your help.

ronjonp

  • Needs a day job
  • Posts: 7531
Dan,

There are many examples of grabbing attribute values and getting dynamic block properties. Did you do a search?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Lee Mac

  • Seagull
  • Posts: 12924
  • London, England

ELOQUINTET

  • Guest
I did do a quick search before asking and have skimmed through the links above. I am able to get the current visibility state but what I need is to get the value of the attribute in the current state which I don't see. Maybe I've missed it but I need to figure this out pronto as I have developed tons of these which will not extract correctly. I can not use out of the box extraction because we are extracting to Archibus. Any help would be greatly appreciated.

Lee Mac

  • Seagull
  • Posts: 12924
  • London, England
Perhaps take a look at Gile's program here  :-)

nivuahc

  • Guest

Lee Mac

  • Seagull
  • Posts: 12924
  • London, England

nivuahc

  • Guest
We've all been there at some point...  :|

Oh, they were GOOD memories!  :-D

Crank

  • Water Moccasin
  • Posts: 1503
If you make the tag name the same as the visibilty state, this should be easy:
First look for the active visibility state, then you look for the value of the attribute with that tag name.
Vault Professional 2023     +     AEC Collection

ELOQUINTET

  • Guest
Sorry it took so long for me to get back in here.

Crank,

The Tag Name cannot match the Visibility state name as we are using different tag names which our extraction routine uses to export the data into one table or another.

I will look at Gile's routine and see if I can make sense out of any of it.

Crank

  • Water Moccasin
  • Posts: 1503
The Tag Name doesn't have to match the Visibility State Name, but this is the easiest solution.

As long as the Tag Name is unique for each Visibility State this should work, but then you will have to make a list first so you can find the right Tag:
Code: [Select]
'((Visibility1 Tag1) (Visibility2 Tag2) (Visibility3 Tag3))
Vault Professional 2023     +     AEC Collection