Jump to content

Find named object a symbol is within


Recommended Posts

Does anyone know if there is a worksheet function by which I can find the name of a named object where a symbol is physically within it's boundaries? So if I have a symbol within the boundaries of a space object, I want to pull the name of that space object onto a worksheet that lists the symbols. I know there is a criteria that allows you to list the symbols that are within a specific named object like a space but I want to go the other way and find the name of that object the symbols are within.

I hope that makes sense.

Thanks,

Greg

Link to comment

Basically what I'm looking to do is populate the location field in my symbol record with the name of the space or polygon the symbol is located within. I would like to be able to move my symbols around and have their location automatically update.

The criteria you mention works the opposite way where you have to know the name of the object and it gives you what symbols are within it.

Link to comment

What you want it not completely possible. You can't trigger when a symbol has been moved. You can do that however with a PIO.

So, what you could do is the following:

In stead of a Symbol, you should make a plugin-object by Point what your symbol inside of it (if you have multiple symbols, you need to create a "choose symbol" dialog (there are some floating on this board).

You let that PIO search for all space objects on the layer where the PIO is placed, saves the handles of the paths and the names of those space objects in an array of Structure.

Loop trough that array and see with PtInPoly() if the insertion point of your PIO (GetSymLoc(PioHandle)) is located in that path.

If so save the name into the record field of you pio.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...