How to obtain Suboccurrence from Reference ?

 

How to obtain Suboccurrence from Reference and Reference from Suboccurrence ?

Thanks.

 

Posted by: Juraj Joob
Post date: 1/11/2010 10:21:10 PM

5 REPLIES

RE: How to obtain Suboccurrence from Reference ?

 

Hi,

 

example:

'Suboccurrence from Reference:

'Save the Way with Names of Occurrences in WayNames List

'from down Referenc to Top level

do

if TypeOf Reference.immediateParent is Occurrence then

'The TopLevel

WayNames.Add(Reference.immediateParent.Name)

exit do

else

WayNames.Add(Reference.immediateParent.Object.Name)

Reference=Reference.immediateParent

end if

Loop

'The Way from Occurrence to Suboccurrence with saved names:

object=Occurrences.Item(WayNames(WayNames.Count-1))

for i=way.Names.count-2 to 0

object=object.suboccurrences.item(WayNames(i))

next i

suboccurrence=object

---------------------------------------------------------------------------------------

 

For Reference from Suboccurrence you must Create a Reference in Loop with Assembly.CreateReference(...)

from down to Top Level Reference.

 

Regards

JR

 

Posted by: JR
Post date: 1/11/2010 11:10:55 PM

RE: How to obtain Suboccurrence from Reference ?

Hi JR,

 

thanks for idea to get Suboccurrence from Reference. But i don't undestand how to create References with Assembly.CreateReference(...).

I want References, because i have problem with selecting, deselecting, showing an hidding suboccurrences. I thing that references are objects, that can showing and selecting instead of suboccurrences.

Please, post me example, how to create References with Assembly.CreateReference(...) and how to select (SelectSet.Add(Reference?)) and hide suboccurrences.

 

Thanks.

 

Thanks.

 

Posted by: Juraj Joob
Post date: 1/11/2010 11:41:05 PM

RE: How to obtain Suboccurrence from Reference ?

Hi JR,

 

thanks for idea to get Suboccurrence from Reference. But i don't undestand how to create References with Assembly.CreateReference(...).

I want References, because i have problem with selecting, deselecting, showing an hidding suboccurrences. I thing that references are objects, that can showing and selecting instead of suboccurrences.

Please, post me example, how to create References with Assembly.CreateReference(...) and how to select (SelectSet.Add(Reference?)) and hide suboccurrences.

 

Thanks.

 

Thanks.

 

Posted by: Juraj Joob
Post date: 1/11/2010 11:41:07 PM

RE: How to obtain Suboccurrence from Reference ?

Suboccurrence has property Visible and i show or hide suboccurrence via this property. What i don't now is selecting and deselecting suboccurrence. It may by possible via reference (SelectSet.Add(Reference)).

 

Posted by: Juraj Joob
Post date: 1/11/2010 11:49:32 PM

RE: How to obtain Suboccurrence from Reference ?

Suboccurrence has property Visible and i show or hide suboccurrence via this property. What i don't now is selecting and deselecting suboccurrence. It may by possible via reference (SelectSet.Add(Reference)).

 

Posted by: Juraj Joob
Post date: 1/11/2010 11:49:33 PM