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

Dymanic block manipulation after changing UCS

3 REPLIES 3
Reply
Message 1 of 4
SRSDS
342 Views, 3 Replies

Dymanic block manipulation after changing UCS

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.

3 REPLIES 3
Message 2 of 4
Hallex
in reply to: SRSDS

Just a guess, perhaps set myBlock.BlockTransform to
ed,CurrentCoordintaeSystem matrix,
sorry not tested
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 3 of 4
SRSDS
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)

 

Message 4 of 4
Hallex
in reply to: SRSDS

Glad you sorted it out
Cheers 🙂
_____________________________________
C6309D9E0751D165D0934D0621DFF27919

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