I'm trying to pull the attribute value out of a block but I'm hitting a bit of a wall. The block's name is fixed (ShtScale), the attribute tag is also fixed (Scale), but I'm not sure what functions I would use to pull this information out as I don't know how its stored. To make this a bit more tricky, I can't use any of the VL, VLA, or VLAX functions as this is part of a larger routine that I run thru accoreconsole and it won't accept any of those (even after loading the acapp.arx). This also means I can't use any user prompts, but I don't really see as being too big of an issue as the block name and att value are both 100% fixed and always will be for the purpose of this function. So far the only snipped of code I've gotten to is:
(setq blk (ssget "_X" '((0 . "INSERT") (2 . "ShtScale") (410 . ltab))))
But this brings up issue 2 that I've hit a wall with, which is how to pass the layout tab name of the current layout tab to the selection set. I've tried this:
(setq ltab (getvar "ctab"))
But what gets set to the "ltab" variable isn't useable in the selection set filter as I'm currently using it and I don't understand why.
Ideally the information it should pull from the block is: "1/8" = 1'-0""
Lee Mac, thank you for your response as well as commenting each line. I tinkered around with it a little bit after I posted yesterday and found a solution to pull the block attribute value:
What I don't get is why I wasn't able to pull the DXF group code "1", which held the block attribute definition, until this line here:
I typically use this little code to quickly look at group code information but its making we wonder if its not pulling in as much DXF info as it could be: