object A centre to the centre of the x-reference object

object A centre to the centre of the x-reference object

karfung
Advocate Advocate
507 Views
25 Replies
Message 1 of 26

object A centre to the centre of the x-reference object

karfung
Advocate
Advocate

Hi Sir, 

The object A is centred at the centre of the x-reference object. When the object of the x-reference moved. The object A is to be corrected automatically to the centre of the x-reference object.     

Kindly advise on any method to set the above. 

 

Thanks. 

0 Likes
Accepted solutions (1)
508 Views
25 Replies
Replies (25)
Message 2 of 26

h_s_walker
Mentor
Mentor

@karfung Group the XREF and the object together

AutoCAD web application Help | GROUP (Command) | Autodesk

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 3 of 26

imadHabash
Mentor
Mentor

Hi,

@karfung 

Could you show us this case through a short video?

Imad Habash

EESignature

Message 4 of 26

Kent1Cooper
Consultant
Consultant

Also read about the PICKSTYLE and GROUPDISPLAYMODE System Variables.

You can also lock them together by putting them into a BLOCK, though to me it seems odd to include an Xref in a Block.

Or, you can use REFEDIT to incorporate object A into the Xref itself.  [That would require that it's acceptable for object A to be in any other drawing into which that file is Xref'd.]

Kent Cooper, AIA
0 Likes
Message 5 of 26

karfung
Advocate
Advocate

Sir,
Attach the drawing for your further action. 
Thanks

0 Likes
Message 6 of 26

imadHabash
Mentor
Mentor

Thanks for the CAD dwg file.

Would you please elaborate more your issue, so we can give you a direct answer?

Imad Habash

EESignature

0 Likes
Message 7 of 26

karfung
Advocate
Advocate

Hi Sir,
Inside the drawing, there are 2 blocks which need to be tallied from centre to centre. 
Assuming the blue square block object from the x-reference file, and subject to move when edited. Kindly advise any method or LISP that can ensure the big object block moves automatically to the centre of the small blue block when it is shifted or moved.  

Kindly advise. 

Thanks. 

0 Likes
Message 8 of 26

Kent1Cooper
Consultant
Consultant

@karfung wrote:

Attach the drawing for your further action. 


Assuming the issue is the same if one object is a Block and not an Xref as originally described....

GROUP is surely the answer [but BLOCK would also work].  If they're GROUPed together, and with the right PICKSTYLE setting, when you select one of them, the other is also selected along with it, so they Move together [using the operation in the original description -- other editing commands would also apply to the entire Group].

Kent Cooper, AIA
0 Likes
Message 9 of 26

karfung
Advocate
Advocate

Sir,

Please assume there have lot of object exist on the plan to be set centre to centre. 1 of the objects was shifted and by assist of the method or LISP, it can be automatically tally to the moved object. Pls advise. 

0 Likes
Message 10 of 26

imadHabash
Mentor
Mentor

@karfung 

If you don't mind ....
since you want both blocks to be always at the same center point, why you don't combine them in a same block?

Imad Habash

EESignature

0 Likes
Message 11 of 26

DGCSCAD
Advisor
Advisor

Have the hatched square realign to the center of the outer square if/when the XREF is edited?

 

If so, one method would be to create a Point into a named Block embedded within each at their alignment points, then some code to line them up could work. The level of complication and overhead depends on how these existing blocks are initially setup.

AutoCad 2018 (full)
Win 11 Pro
0 Likes
Message 12 of 26

karfung
Advocate
Advocate

You are right also. But, the 2 blocks may need to mix with other type of block also. They not necessary to be similar. Second, the blue rectangle block is attach to lot layout and the another block is shown in 1 of layout only.

0 Likes
Message 13 of 26

imadHabash
Mentor
Mentor

I suggest to combine all of your cases in one DYNAMIC block and activate Visibility option and as shown in below image (Click to enlarge).

Vis.gif

 

To Set Up a New Visibility State in a Dynamic Block

 

Imad Habash

EESignature

0 Likes
Message 14 of 26

TheCADnoob
Mentor
Mentor

I'm not sure i understand the design need. I understand what you are asking but it sound like you are trying to build a work around for something that may be better done another way. 

 

Normally this type of activity is managed by shared coordinate systems. Is there a reason that you are trying to this outside of a coordinate system?

CADnoob

EESignature

0 Likes
Message 15 of 26

Kent1Cooper
Consultant
Consultant

@karfung wrote:

Please assume there have lot of object exist on the plan to be set centre to centre. 1 of the objects was shifted and by assist of the method or LISP, it can be automatically tally to the moved object. ....


I don't see what is wrong with GROUPing them.  You can have as many Groups in a drawing as you want, and each Group can have as many objects as you want [it sounds like yours will each have two objects].  Have you tried it?  In what way does it not do what you want?

Kent Cooper, AIA
0 Likes
Message 16 of 26

karfung
Advocate
Advocate

could share a sample example ? 

0 Likes
Message 17 of 26

karfung
Advocate
Advocate

@imadHabash agreed with you. But, I may have a hundred objects of this. I cannot click the object 1 by 1. Making it a different layer shall be the best proposal. But, the blue rectangle need turn on and show on lot of drawings,  meanwhile the big object only shows up in 1 of the drawings. the big object to be turn off in other of drawing. When I shift the blue rectangle, the big object may not be shifted, where these 2 object in diferent layer and block. That is the purpose of my query. thanks. 

0 Likes
Message 18 of 26

Kent1Cooper
Consultant
Consultant

@karfung wrote:

could share a sample example ? 


I could, but answer my questions in Message 15 first.

Kent Cooper, AIA
0 Likes
Message 19 of 26

karfung
Advocate
Advocate

Yes, you are right. We can group it. As I said before, the big object may need to be turned off always. When the blue rectangle shifted, the big object will not be moved when it hthe layer was turned off.  thnaks. 

0 Likes
Message 20 of 26

imadHabash
Mentor
Mentor

@karfung 

>> meanwhile the big object only shows up in 1 of the drawings. the big object to be turn off in other of drawing.

Taking into account your working conditions, I suggest that a special block be made for this one drawing, as you mentioned, and I think this is the most practical solution.

Imad Habash

EESignature

0 Likes