Author Topic: Replacing block with VB.Net ObjectARX  (Read 2543 times)

0 Members and 1 Guest are viewing this topic.

cannorth

  • Guest
Replacing block with VB.Net ObjectARX
« on: February 12, 2013, 05:44:19 PM »
Hello,

  I have some code that inserts blocks into a drawing.  I then need to delete the blocks and then reinsert them again.  The reason I need to reinsert them is because they have dynamic block height and width properties that need to be changed.  If I use a transaction the first time and commit the changes, how can I delete the old blocks and reinsert them in the drawing?

Thanks,

cannorth

TheMaster

  • Guest
Re: Replacing block with VB.Net ObjectARX
« Reply #1 on: February 12, 2013, 11:23:44 PM »
Hello,

  I have some code that inserts blocks into a drawing.  I then need to delete the blocks and then reinsert them again.  The reason I need to reinsert them is because they have dynamic block height and width properties that need to be changed.  If I use a transaction the first time and commit the changes, how can I delete the old blocks and reinsert them in the drawing?

Thanks,

cannorth

Have you tried changing the height and width properties on the existing insertions ?

Replacing Dynamic block insertions is not as simple as regular blocks, because they are insertions of anonymous blocks that are generated on the fly when you modify anything in an insertion that triggers a visual change.


cannorth

  • Guest
Re: Replacing block with VB.Net ObjectARX
« Reply #2 on: February 13, 2013, 10:03:52 AM »
Yes, I tried changing the height and width dynamic properties of the block, and it doesn't change.

cannorth

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Replacing block with VB.Net ObjectARX
« Reply #3 on: February 13, 2013, 10:10:29 AM »
I am almost certain I have changed dynamic properties it they updated just fine. Will try to find code, but maybe an example block or example would help.


TheMaster

  • Guest
Re: Replacing block with VB.Net ObjectARX
« Reply #4 on: February 13, 2013, 03:21:26 PM »
Yes, I tried changing the height and width dynamic properties of the block, and it doesn't change.

cannorth

Did you call BlockReference.ResetBlock() after making the changes ?

cannorth

  • Guest
Re: Replacing block with VB.Net ObjectARX
« Reply #5 on: February 14, 2013, 11:15:46 AM »
No I didn't, but when I do blockReference.ResetBlock, nothing changes.

cannorth

Gasty

  • Newt
  • Posts: 90
Re: Replacing block with VB.Net ObjectARX
« Reply #6 on: February 14, 2013, 11:39:58 AM »
Hi,

Please upload the block along with the code, so others can inspect/test it and avoid a guessing game.

Gaston Nunez

cannorth

  • Guest
Re: Replacing block with VB.Net ObjectARX
« Reply #7 on: February 14, 2013, 01:32:38 PM »
I've created a new topic called move or moving entities.  The new code I'm using is there.

Thanks,

cannorth