- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm working on some code that inserts blocks when you click. No biggie.
Everything works fine - so long as the user is using a non-annotative block - I'd like to check to see if the block being inserted is annotative or not. So I can adjust my code accordingly.
I figured it'd be something along the lines of
(entget (tblobjname "BLOCK" "nameofblock"))
The problem is, there is no difference between what I get out of that for a block is is annotative and one that isn't.
Annotative Block Entget
((-1 . <Entity name: 24345b509a0>) (0 . "BLOCK") (330 . <Entity name: 24345b50990>) (5 . "37A") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockBegin") (70 . 2) (10 0.0 0.0 0.0) (-2 . <Entity name: 24345b509c0>) (2 . "testyes") (1 . ""))
\
Non Annotative Block Entget
((-1 . <Entity name: 24345b50910>) (0 . "BLOCK") (330 . <Entity name: 24345b50900>) (5 . "371") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockBegin") (70 . 2) (10 0.0 0.0 0.0) (-2 . <Entity name: 24345b50930>) (2 . "testnon") (1 . ""))
I tried to use the function that I found here: https://www.cadtutor.net/forum/topic/78681-check-if-block-is-annotative/ but I'm struggling with it because a Block definition doesn't have a Group Code 360, only 330. (Also I don't fully understand dictsearch yet) Passing that function the entity name I get from TBLOBJNAME only returns nil.
If I do a DXF dump of the file, I can clearly see that I'm looking for Group Codes 1070. But that's not being retrieved with an entget.
Does anyone have any insight on where I'm being ignorant?
Solved! Go to Solution.