Jump to content
Developer Wiki and Function Reference Links Read more... ×
Pat Stanford

Get Symbol Instance from object in Symbol Def??

Recommended Posts

@MullinRJ @JBenghiat @Julian Carr

 

Can anyone provide a way to get a handle to a symbol instance on a drawing given only a handle to an object in the symbol definition?

 

I have a symbol of a bathroom. Inside that symbol is a symbol of a toilet with a record attached. I create a worksheet and use a worksheet to pull data from the toilet symbol into separate subrows of a database. This works fine.

 

Now I want to know where the toilet symbol I am pulling data from is located on the drawing.

 

I can't figure a way to get that information. The worksheet location functions, Symloc or XCenter/YCenter in a worksheet script all return the location of the symbol in the internal coordinates of the bathroom (parent) symbol. The Handle to the toilet symbol is the same for multiple instances of the symbol.

 

I need a way to get the location of the toilet, or even better a handle to the parent symbol instance.

 

It seems impossible, but maybe the deep thinkers here can see something I can't.

 

Regards,

Pat

 

Share this post


Link to post

Pat,

   Is the toilet symbol only used in the Bathroom symbol, or does it exist in other symbols, or by itself on the drawing? Can you post a sample file? I doubt I could recreate what you've got from your description.

 

Raymond

Share this post


Link to post

The only identifying qualities of symbol instances are the location of the instance and the data in its attached record.

The objects within only exist within that symbol's definition. They are photocopied at each instance of the parent.

Therefore if you place a 4 stall toilet room on three floors of a dormitory you have three instances of the parent toilet room and four instances of the toilets within the file. The latter being in the file's symbol definition area. You would not be able to uniquely number (identify) the toilets throughout a drawing file with the data that's placed within a record attached to the toilet instance. An additional record field for each internal symbol would have to be attached to the parent object's instance. I don't believe symbol instances create this additional structured data automatically.

Now if that parent object was a plug-in instance and not a symbol there is an ability to pass data to records attached to the objects within whenever it is regenerated. No such capability exists for symbols, although you can pretend by linking text to a data field at the parent level.

 

I hope that helps re-focus the problem.

 

Larry

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×