Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Define a point of anchor in a block for connection with other shapes

Anonymous

Define a point of anchor in a block for connection with other shapes

Anonymous
Not applicable

Hi,

I'd like to know if is possible to define a custom object that can be put in connection with other blocks exposing a certain point on its border for the anchor. Sorry if I'm not using a specific autocad language in my description. If possible can I know all the shapes/object that are connected with my block? 

I'm a computer scientist not an Engineer. 🙂

I'll give you an example image for a better explenation.example.png

 

Best Regard,

Marco

0 Likes
Reply
1,761 Views
12 Replies
Replies (12)

Bob_Zurunkle
Advisor
Advisor

I have seen some ability with dimensions but not with leaders as in your example. Using the stretch command (crossing option) around your block and the end of the leader will move both simultaneously.

If by some odd chance my nattering was useful -- that's great, glad to help. But if it actually solved your issue, then please mark my solution as accepted 🙂
0 Likes

dbroad
Mentor
Mentor

Multileaders can already be associated with block inserts as long as an object snap is used to specify the arrow position.  If you want to develop your own objects, look into programming with .NET.  To prototype the behavior with AutoLISP, you could explore object reactors, specifically the :vlr-modifed and :vlr-openedformodify events.

 

Architect, Registered NC, VA, SC, & GA.

RocksterB
Advocate
Advocate

Looks like something done by Lee Mac’s lisp.

0 Likes

dbroad
Mentor
Mentor

There was no lisp in my demonstration.

Architect, Registered NC, VA, SC, & GA.
0 Likes

Anonymous
Not applicable

Thank you,

I've other questions 🙂

 

Can I define the points in which the block should be osnapped ?

Only arrows can be connected to the block?

Can I know somehow how much arrows are osnapped to my block ?

 

Best Regard,

Marco

0 Likes

dbroad
Mentor
Mentor

These are really questions that you should be able to investigate yourself.  

  • Can I define the points in which the block should be osnapped ?
    • Certainly. This is as easy as adding points to the block definition. Do you not have AutoCAD to test with?
  • Only arrows can be connected to the block?
    • I don't understand the question. I used the leader command and used object snap. As I said before, if you want to implement custom behavior with other types of objects, you need to create the reactors yourselves.  This is a complicated process without using .NET.
  • Can I know somehow how much arrows are osnapped to my block ?
    • This is also a question that could be answered by (entget (car(entsel))) on the block.

 

 

 

((-1 . <entity name: 35ae76c0>)
  (0 . "INSERT")
  (5 . "2C4")
  (102 . "{ACAD_REACTORS")
  (330 . <entity name: 35ae62f0>)
  (330 . <entity name: 35ae6410>)
  (330 . <entity name: 35ae6530>)
  (330 . <entity name: 35ae6650>)
  (330 . <entity name: 35ae6770>)
  (330 . <entity name: 35ae5110>)
  (330 . <entity name: 35ae5230>)
  (102 . "}")
  (330 . <entity name: 4bd43700>)
  (100 . "AcDbEntity")
  (67 . 0)
  (410 . "Model")
  (8 . "0")
  (100 . "AcDbBlockReference")
  (2 . "test")
  (10 0.0 0.0 0.0)
  (41 . 1.0)
  (42 . 1.0)
  (43 . 1.0)
  (50 . 0.0)
  (70 . 0)
  (71 . 0)
  (44 . 0.0)
  (45 . 0.0)
  (210 0.0 0.0 1.0)
)

 

 

 

Simple test:  Compare the entity data list before and after snapping leaders to it.  Here is a screencast.

 

Architect, Registered NC, VA, SC, & GA.
0 Likes

ed57gmc
Mentor
Mentor

@Anonymous wrote:

I'm a computer scientist not an Engineer. 🙂


Computer scientists usually use Microsoft Visio for what you want. This type of functionality is built in. It is used to create flow charts and computer aided software development.

Ed


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.
How to post your code.

EESignature

Anonymous
Not applicable

Ok,

very wonderful, but can I set a rule for whic my box should accept Leaders only at a certain point in its circumference?

 

Bye,

Marco

0 Likes

dbroad
Mentor
Mentor

I'm not sure that I understood the question but if using mleaders, then only if you could prefilter the point selection before issuing the mleader command.

Architect, Registered NC, VA, SC, & GA.
0 Likes

Anonymous
Not applicable

I'd like to set a rule on my block: "the block can be connected only by 1 leader".

If a leader is attached to the block and I attemp to attach another leader must be impossible.

0 Likes

dbroad
Mentor
Mentor

You can't limit how the multileader command works.  You can undefine it and then add parent logic and use the built-in version as a subroutine. Someone can still access the built-in command by using the "." prefix though.

Architect, Registered NC, VA, SC, & GA.
0 Likes

mikael_forsbergHTRNV
Explorer
Explorer

Hi Doug,

 

I'm resurrecting this forum post because I have the exact same question as Marco.

Although I can't figure out how you get the leader to associate with the block in your screencast? 

Perhaps I misunderstood and you have to program it?

 
0 Likes