Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

dimension blocks?

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
411 Views, 4 Replies

dimension blocks?

I have come across several unknown blocks in our drawings that are
linked the the dimensions..

they are all called *D1, *D2, *D3, *D4, .. ECT. my question is.. what
are they? If I delete them, my dimensions vanish (though the node
points are still in the drawing and can be seen using Ctrl+A). Yet if I
try to use them "like a block".. ie insert.. they don't exist. If I
delete the dimensions these "blocks" are gone (not by purge, they just
vanish).

Any insight would be appreciated.

TIA.
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

dimensions are a 'special' kind of block
they are named as you discovered, *Dxxx
they are not 'insertable' thus *Dxxx's don't show up in insert dialog
they are in the block table if you ever need access to their component parts
if you delete a dimension, the block definition is still there until you
purge

not sure how you're seeing this: "If I delete the dimensions these "blocks"
are gone (not by purge, they just vanish)."
how are you 'seeing' them vanish? by reading the block table?

"C Witt" wrote in message
news:3FC240DC.9030505@trkeng.com...
> I have come across several unknown blocks in our drawings that are
> linked the the dimensions..
>
> they are all called *D1, *D2, *D3, *D4, .. ECT. my question is.. what
> are they? If I delete them, my dimensions vanish (though the node
> points are still in the drawing and can be seen using Ctrl+A). Yet if I
> try to use them "like a block".. ie insert.. they don't exist.
>
> Any insight would be appreciated.
>
> TIA.
>
Message 3 of 5
Anonymous
in reply to: Anonymous

yes..

ok, next question.

I am using this lisp:

--
; (setq all_blocks (mapcar (function (lambda (i) (strcase i)))(ai_table
"block" 0)))
; (setq keep_block (mapcar 'strcase (list "NA" "_archtick" )))
; (or thisdwg (setq thisdwg (vla-get-activedocument
(vlax-get-acad-object))))
; (foreach blockname all_blocks
; (if (not (vl-position blockname keep_block))
; (if (not (vl-catch-all-error-p (setq block1 (vl-catch-all-apply
'vla-item (list (vla-get-blocks thisdwg) blockname)))))
; (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-delete (list
block1)))))))
--

to purge misc blocks .. so, how can I add these dimension blocks to the
"keep list"?


Mark Propst wrote:
> dimensions are a 'special' kind of block
> they are named as you discovered, *Dxxx
> they are not 'insertable' thus *Dxxx's don't show up in insert dialog
> they are in the block table if you ever need access to their component parts
> if you delete a dimension, the block definition is still there until you
> purge
>
> not sure how you're seeing this: "If I delete the dimensions these "blocks"
> are gone (not by purge, they just vanish)."
> how are you 'seeing' them vanish? by reading the block table?
>
> "C Witt" wrote in message
> news:3FC240DC.9030505@trkeng.com...
>
>>I have come across several unknown blocks in our drawings that are
>>linked the the dimensions..
>>
>>they are all called *D1, *D2, *D3, *D4, .. ECT. my question is.. what
>>are they? If I delete them, my dimensions vanish (though the node
>>points are still in the drawing and can be seen using Ctrl+A). Yet if I
>>try to use them "like a block".. ie insert.. they don't exist.
>>
>>Any insight would be appreciated.
>>
>>TIA.
>>
>
>
>
Message 4 of 5
Anonymous
in reply to: Anonymous

"C Witt" wrote in message
news:3FC24CB6.2030008@trkeng.com...

one possibility

> ; (foreach blockname all_blocks
> ; (if
(not
(or
(vl-position blockname keep_block)
(=(substr blockname 1 2)"*D")
);or

>
> to purge misc blocks .. so, how can I add these dimension blocks to the
> "keep list"?
>
Message 5 of 5
Anonymous
in reply to: Anonymous

Another method to look at.

(vlax-map-collection (vla-get-blocks thisdwg)
(function (lambda (x)
(and (not (vl-position (vla-get-name x) keep_block))
(not (vl-string-search "*D" (vla-get-name x)))
(vl-catch-all-apply 'vla-delete (list x)))
))
)



--
Ken Alexander
Acad2000
Windows2000 Prof.

"We can't solve problems by using the same kind
of thinking we used when we created them."
--Albert Einstein

"C Witt" wrote in message
news:3FC240DC.9030505@trkeng.com...
> I have come across several unknown blocks in our drawings that are
> linked the the dimensions..
>
> they are all called *D1, *D2, *D3, *D4, .. ECT. my question is..
what
> are they? If I delete them, my dimensions vanish (though the node
> points are still in the drawing and can be seen using Ctrl+A). Yet
if I
> try to use them "like a block".. ie insert.. they don't exist. If I
> delete the dimensions these "blocks" are gone (not by purge, they
just
> vanish).
>
> Any insight would be appreciated.
>
> TIA.
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost