Community
Is there a way to see the block preview with my cursor using vla-insertblock? A lot like the command -insert function
(setq PlantBlockObject (vla-insertblock (vla-get-modelspace (vla-get-activedocument(vlax-get-acad-object))) (vlax-3d-point (trans (getpoint) 1 0)) (strcat pBlockPath pBlockName ".dwg") xBlockScale yBlockScale zBlockScale (angle '(0 0 0) (getvar "ucsxdir")) );_end insert block );_end setq
Hi,
If you really have a good reason not to use the command function:
(command "_.insert" (strcat pBlockPath pBlockName ".dwg") "X" xBlockScale "Y" yBlockScale "Z" zBlockScale
"_rotate" 0.0 )
You can use grread, but you will loose the object snaps:
(setq PlantBlockObject (vla-insertblock (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))) (vlax-3d-point '(0. 0. 0.)) (strcat pBlockPath pBlockName ".dwg") xBlockScale yBlockScale zBlockScale (angle '(0 0 0) (getvar "ucsxdir")) ) ) (while (and (setq gr (grread T 4 0)) (/= (car gr) 3)) (vla-put-InsertionPoint PlantBlockObject (vlax-3d-point (trans (cadr gr) 1 0))) )