Jump to content

Recommended Posts

Posted

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?

  • 2 months later...
Posted

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

Posted

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"...)"?

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...