Changing BlockReference coordinate system from UCS to WCS

Changing BlockReference coordinate system from UCS to WCS

rberghLJ4SA
Enthusiast Enthusiast
683 Views
2 Replies
Message 1 of 3

Changing BlockReference coordinate system from UCS to WCS

rberghLJ4SA
Enthusiast
Enthusiast

Hi Guys,

 

I have a BlockReference object when I look at the object data the BlockTransform.CoordinateSystem is a ucs that was active when the block was placed. 

 

Can I change the BlockReference object's Coordinate system to WCS and if it's possible how would I go about it.

 

Regards

Riaan

0 Likes
684 Views
2 Replies
Replies (2)
Message 2 of 3

_gile
Consultant
Consultant

Hi,

 

The BlockReference.BlockTransform matrix does not exactly match with the one of the active UCS  during the block reference insertion because it does not take in account of this UCS origin.

Anyway, you can try to transform the block reference with the inverse matrix of the one returned by BlockReference.BlockTransform and change its position as you need.

br.TransformBy(br.BlockTransform.Inverse());


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 3

rberghLJ4SA
Enthusiast
Enthusiast

Thanks I'll give it a try

0 Likes