.NET

Reply
Distinguished Contributor
SRSDS
Posts: 243
Registered: ‎04-15-2011
Message 1 of 4 (154 Views)

Dymanic block manipulation after changing UCS

154 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 (152 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
Distinguished Contributor
SRSDS
Posts: 243
Registered: ‎04-15-2011
Message 3 of 4 (136 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 (121 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community