Inserting a block

Inserting a block

Anonymous
Not applicable
184 Views
2 Replies
Message 1 of 3

Inserting a block

Anonymous
Not applicable
Hi all,

I am having a problem getting the block I am inserting to come in in the proper place. As you can see by the code below, the block should come in at 0,0. But, for some strange reason it comes in at like 1", 87'-3". I have tested manually inserting the same block with the same insertion point and it works fine. I have also changed the numbers to 0,0 and it works fine. Am I missing something? I am not sure what is going on here.

Dim insertFUSsc5(0 To 2) As Double
insertFUSsc5(0) = 1: insertFUSsc5(1) = 1: insertFUSsc5(2) = 0
Set acadFUSblock2 = ThisDrawing.ModelSpace.InsertBlock(insertFUSsc5, "x:\cad standards\blocks\R2000\masks\FUS_11x17_Nar_FT54.dwg", 5, 5, 5, strArrowRot)

The above code is just a small snipit. All of the string names are declared somewhere else.

Thanx for any help you can give.

Rob
0 Likes
185 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Hello Rob,

For a proper use of InsertBlock i think you have to declare your variables
like this:
Using a Variant instead of a Double for the InsertionPoint works.
Is strArrowRot declared as a String? Should this not be a Double?

By the way: When you set the X and Y value of the InsertionPoint 1 instead
of 0, the block will never be inserted at the origin.

Happy New Year,

Henk Loonstra
www.CadFancy.myweb.nl
0 Likes
Message 3 of 3

Anonymous
Not applicable
 


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
Hi
all,

I am having a problem getting the block I am inserting to come in in the
proper place. As you can see by the code below, the block should come in at
0,0. But, for some strange reason it comes in at like 1", 87'-3". I have
tested manually inserting the same block with the same insertion point and it
works fine. I have also changed the numbers to 0,0 and it works fine. Am I
missing something? I am not sure what is going on here.

Dim insertFUSsc5(0 To 2) As Double
insertFUSsc5(0) = 1: insertFUSsc5(1)
= 1: insertFUSsc5(2) = 0
Set acadFUSblock2 =
ThisDrawing.ModelSpace.InsertBlock(insertFUSsc5, "x:\cad
standards\blocks\R2000\masks\FUS_11x17_Nar_FT54.dwg", 5, 5, 5, strArrowRot)

The above code is just a small snipit. All of the string names are declared
somewhere else.

Thanx for any help you can give.

Rob

0 Likes