Hi Guys
a colleague turn to me yesterday with this problem...he uses dimarc some times it has a large radius. dimarc has a defpoint at the center of the arc
when he zooms to an area he 'see' the defpoint but not the dimarc and selects some objects by crossing to erase, autocad selects the dimarc (which is off screen). the result the dimarc gone.
so i developed this lisp to turn off visibility to dimarc center point
; apply dimarc center point visibility (defun apply_dacp_visibility (ename / p15 blkName blocks-table BlkTblRec AcDbEntity coords^ p0) (setq elist (entget ename)) (setq p15 (cdr (assoc '15 elist))) (setq blkName (cdr (assoc '2 elist))) (setq blocks-table (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))) (setq BlkTblRec (vla-item blocks-table blkName)) (vlax-for AcDbEntity BlkTblRec (if (and (eq (vla-get-objectName AcDbEntity) "AcDbPoint") (setq coords^ (vlax-get-property AcDbEntity 'Coordinates)) (setq p0 (vlax-safearray->list (variant-value coords^))) (equal (distance p0 p15) 0.0 0.1) ) (vlax-put-property AcDbEntity 'visible :vlax-false) ; apply visibility ) (vlax-release-object AcDbEntity) ); vlax-for (vlax-release-object BlkTblRec) (vlax-release-object blocks-table) )
every thing work fine except there is a need to a Regen in order to see the change
is there a way to skip the Regen?
thanks in advance
Moshe
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
Kent,
yes you are right (as always)
i only used (entupd) only to update attributes
thank you very much
Moshe
Kent hi,
the lisp works fine (the dimarc center point visibility is disabled) but there is a problem.
as soon as you invoke a modify commands on the dimarc (move, copy, rotate, scale) autocad restore the point back
at first i thought autocad deletes the *D??? anonynous block and insert a new but no...it's is the same block name
weird that autocad goes deeply inside block definition for only moving\coping the block
Do you have an idea how can i solved this with out using reactors?
Moshe