Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Maxim-CADman77
529 Views, 4 Replies

DisplayName of BrowserNode parent to the Face (DerrivedAssy with SuppressedLink)

I'd like to know if it possible to get DisplayName of the top-most BrowserNode parent to the given Face when it is about DerivedAssembly with link suppressed.

As a test sample I'm using Switch Mold_Combined CR1.ipt (one of generic sample files see folder \Models\Mold Design\Switch\Switch Mold\).

I'm using this iLogic code:

 

oFace = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "")
Dim PrFtrNm As String="" 
Dim oNBND As NativeBrowserNodeDefinition=ThisDoc.Document.BrowserPanes.GetNativeBrowserNodeDefinition(oFace.SurfaceBody.CreatedByFeature)
If oNBND.NativeObject.Type=ObjectTypeEnum.kReferenceFeatureObject Then
	PrFtrNm=oNBND.NativeObject.ReferenceComponent.ReferencedDocumentDescriptor.DisplayName ' "With" exception failure if link to derived (reference) component is suppressed or broken.
Else
	PrFtrNm=oNBND.Label
End If
MsgBox(PrFtrNm,,"PrFtrNm")

 

 

When I pick one of that faces (for example the one highlighted red on the screenshot):

Face-of-Interest_InDerASSY-Sample.png

 

I get exactly what i need:

Get_DerAssyBrNd_DisplayName_OK.png

 

But if I try to repeat this after suppress link with Base (Derrived Assembly) component I get error "Object Variable or With block Variable Not Set" instead.

 

Hope to get some workaround for this case... 

 

PS:

Sorry I dont know how to choose oFace using one of its identifiers

TransientKey:

43852

   or

GUID:

{19A3A58F-597A-1506-FD16-70F14FA4D916}

Please vote for Inventor-Idea Text Search within Option Names