Dynamic Block Coordinates

Dynamic Block Coordinates

Anonymous
Not applicable
3,866 Views
7 Replies
Message 1 of 8

Dynamic Block Coordinates

Anonymous
Not applicable

Hi,

 

Using AutoCAD 2016.

 

I'm trying to add two setout points to a dynamic block I've created. Neither of these points are the insertion point of the block and I want both to report their coordinates in WCS.

 

So far I've created two points for the setout locations within the block, added attributes for Point_X and Point_Y and changed their default values to a field>object>position formatted as appropriate selecting the points as the object. No matter what I do these values report the relative position inside the block not the WCS position after the block has been inserted and rotated in a drawing. Is there any easy way around this?

 

Thanks very much for your time.

 

Philip Las Gourgues

0 Likes
Accepted solutions (1)
3,867 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
Accepted solution

Just for the information of anyone who finds this with a search I solved the problem by changing the field value of the formula as below:

 

For Easting (x) values:

InsertionPointX+BlockOffset*cos(Rotation)

 

For Northing (y) values:

InsertionPointY+BlockOffset*sin(Rotation)

 

The fields need to be set up in the default attribute values while in the block editor. InsertionPoint and Rotation are BlockPlaceHolder values. Let me know if you need any clarification.

 

Message 3 of 8

jtm2020hyo
Collaborator
Collaborator

@Anonymous wrote:

Just for the information of anyone who finds this with a search I solved the problem by changing the field value of the formula as below:

 

For Easting (x) values:

InsertionPointX+BlockOffset*cos(Rotation)

 

For Northing (y) values:

InsertionPointY+BlockOffset*sin(Rotation)

 

The fields need to be set up in the default attribute values while in the block editor. InsertionPoint and Rotation are BlockPlaceHolder values. Let me know if you need any clarification.

 


can you share your drawing example?

0 Likes
Message 4 of 8

KZambaux
Enthusiast
Enthusiast

Hello,

Can you share your details?

I am in the same case as you and I don't understand how you solved it.

I have a dynamic block. Let say a rectangle.

The insertion point is the bottom left corner. I add a point (parameter) in the upper right corner.

When I insert this block, I have the coordinates of the upper right corner relative to the insertion point and not to the WCS position.

How can I the coordinates of the point without performing formula? Does Autocad cannot compute the values directly?

Thanks for your time

Message 5 of 8

Draughter83
Participant
Participant

Hi @jtm2020hyo , Are you able to elaborate on this at all please?  I have a pit with a top left and bottom right corner where I want to link the x/y coordinates to my table.  Ordinarily I have carried out such work with dynamic fields and blocks using a circular SOP so the centre most point is taken as where the values are taken.  

 

I only seem to be able to get x/y coords for the bottom left corner of my square pit.  Even if I can change the base point I would still need a second point to link to my table.  Any help greatly appreciated.

Message 6 of 8

SWS77
Contributor
Contributor

Looking for the same thing, how to get the coordinates of a point in a block - not the insertion point, but a point added using the block editor.

0 Likes
Message 7 of 8

h_s_walker
Mentor
Mentor

Post your block. It should be possible with field codes

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 8 of 8

SWS77
Contributor
Contributor

Thanks for the reply.  I did find this post that helped me.

0 Likes