Olhado_ Posted June 18, 2009 Posted June 18, 2009 I am not quite sure how to say it; but I have built a program that we have all probably done to insert a block selected from a list. However, the user has to do it blind, without any preview of the block to show them what the block will look like, before they insert it and move it. Does anyone know if it is possible to do that dynamic preview of a block before insert? Quote
JonathanP Posted August 26, 2009 Posted August 26, 2009 Hi Olhado, Have you found the information you were looking for? I am also trying to figure out how to give the user a block preview upon insertion, I searched the internet but I sadly found nothing. It seems you and I are the only ones interested in it. It is possible though through Sendcommand, but I'd rather not using it. My program lets the user select a block, insert it and eventually rotate it. I would like to have preview of the block at list at rotation but still I can't manage to make it working... Quote
Olhado_ Posted August 27, 2009 Author Posted August 27, 2009 Still no luck and I am surprised since I thought it tends to be good programming practice to program your AutoCAD functions to work like the default AutoCAD functions. Although, I am glad to hear that it could work with the SendCommand, even if I try to avoid it where possible too. Is this the "...SendCommand ("-Insert"...)"? Quote
JonathanP Posted August 28, 2009 Posted August 28, 2009 Yo can use: ThisDrawing.SendCommand "-insert" & vbCr & "blockname or path" & vbCr Or: ThisDrawing.SendCommand "-insert" & vbCr & "blockname or path" & vbCr & "scale" & vbCr & "1" & vbCr The first allows you to directly insert the block, then you can select a scale and rotate the block. The second does the scaling for you (in this case "1"), then you can rotate it. You can quote blockname only if your block is situated in your -support file search path-, otherwise you need to specify the blockpath as well. Jonathan Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.