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

Vla-Insertblock and seeing the block preview during insert

1 REPLY 1
Reply
Message 1 of 2
Redraiderr2009
1431 Views, 1 Reply

Vla-Insertblock and seeing the block preview during insert

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																													

 

Tags (1)
1 REPLY 1
Message 2 of 2
_gile
in reply to: Redraiderr2009

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)))
)

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

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

Post to forums  

Autodesk Design & Make Report

”Boost