.NET

Reply
Mentor
SRSDS
Posts: 250
Registered: ‎04-15-2011
Message 1 of 4 (164 Views)

Dymanic block manipulation after changing UCS

164 Views, 3 Replies
05-28-2013 08:17 AM

The dynamic position and angle parameters within the inserted blocks appear to be based on the UCS at the time of insertion and relative to the basepoint of the block. These positions don’t change if the UCS is changed or block is rotated.

I can’t work out how to modify the position parameters if the UCS is not the same as that used when the block was inserted.

 

Can anyone suggest how I access these positions after changing the UCS?

 

I’ve tried looking at the ECS of the block reference but I’m not sure if that’s what I need to be using.

*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 4 (162 Views)

Re: Dymanic block manipulation after changing UCS

05-28-2013 08:34 AM in reply to: SRSDS
Just a guess, perhaps set myBlock.BlockTransform to
ed,CurrentCoordintaeSystem matrix,
sorry not tested
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Mentor
SRSDS
Posts: 250
Registered: ‎04-15-2011
Message 3 of 4 (146 Views)

Re: Dymanic block manipulation after changing UCS

05-28-2013 11:36 AM in reply to: Hallex

I worked it out. Thanks as that pointed me in a direcition.

 

I had to convert the points to the WCS using

mypnt.TransformBy(bref.BlockTransform)

and then revert them back into the modifed block.

 

The complication was that a rotation parameter was changing the blocks transformation matrix between collecting the positions points and modifying them so I had to convert the positions back using the modified br.BlockTransform matrix.

 

mypnt.TransformBy(bref.BlockTransform.Inverse)

 

*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 4 of 4 (131 Views)

Re: Dymanic block manipulation after changing UCS

05-28-2013 02:27 PM in reply to: SRSDS
Glad you sorted it out
Cheers :smileyhappy:
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!