.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VB.NET - Dynamic Blocks - Layers and Dimensions

4 REPLIES 4
Reply
Message 1 of 5
patmang
843 Views, 4 Replies

VB.NET - Dynamic Blocks - Layers and Dimensions

Forgive me...I am a newbie, but studying hard!

I am writing this program that calls up a form and the user can input variables such as sizes, my code then calls in a dynamic block and I have it set so that the user may pick the insertion point. The block comes in ONLY IF THE BLOCK LAYERS ARE SET TO "0"! If I change the layers inside the block I get an "ebroken handle" error. "Yes the target dwg contains the layer if I do a clone wblock and insert."

Secondly, let's say my block has a "width" parameter and the user inputs what the desired width is--- my grips of the block stay where I have the parameter in the original block. If I move the block, it digitizes and shows original size of the block, but then restores to the user input size(s) when a command is complete.

What am I doing wrong?

I will post the code when I get home as I don't have it right know...I am currently using Jerry Winters latest book VB.Net for AutoCAD.

If anyone can be of some assistance or knows what I am talking about, please feel free to reply.

Thanks in Advance!

PATMANG
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: patmang

I had the same problem. There are a number of errors in Jerry's code.

Try the attached version.

patmang@mangco.com wrote:
> Forgive me...I am a newbie, but studying hard! I am writing this program
> that calls up a form and the user can input variables such as sizes, my
> code then calls in a dynamic block and I have it set so that the user
> may pick the insertion point. The block comes in ONLY IF THE BLOCK
> LAYERS ARE SET TO "0"! If I change the layers inside the block I get an
> "ebroken handle" error. "Yes the target dwg contains the layer if I do a
> clone wblock and insert." Secondly, let's say my block has a "width"
> parameter and the user inputs what the desired width is--- my grips of
> the block stay where I have the parameter in the original block. If I
> move the block, it digitizes and shows original size of the block, but
> then restores to the user input size(s) when a command is complete. What
> am I doing wrong? I will post the code when I get home as I don't have
> it right know...I am currently using Jerry Winters latest book VB.Net
> for AutoCAD. If anyone can be of some assistance or knows what I am
> talking about, please feel free to reply. Thanks in Advance! PATMANG
Message 3 of 5
patmang
in reply to: patmang

Thanks for your help...I will try it...Are you telling me this is a fix that you have used already?

I can't wait to see how it works out!

Thanks again!
Message 4 of 5
Anonymous
in reply to: patmang

Yes. it's Jerry's code, but with the errors fixed.

patmang@mangco.com wrote:
> Thanks for your help...I will try it...Are you telling me this is a fix
> that you have used already? I can't wait to see how it works out! Thanks
> again!
Message 5 of 5
patmang
in reply to: patmang

Please send me an email address if you get a chance...
Any other areas I have to really watch out for or was it just in the blocks/clone chapters?

Layers worked like a charm, but my grips are staying in the original locations after the user changes the distance and when I go to move the block I see the original block back at it's original size. Aren't the grips in the block table record? Shouldn't they change with the new dimension(s)?

Anyway - I do APPRECIATE your HELP! so far - it seems you were on the same path as me!

Thanks Again!

I look forward to speaking with you over email - I don't want to overload the posting!

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost