Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

non-geometric components and UGOpen

 

Is there an equivalent to UF_ASSEM_ask_all_part_occ_children() in UGOpen which will return the non-geometric components along with the rest?

--

Dennis Paul Himes
CSC

Disclaimer: "True, I talk of dreams; which are the children of an idle brain, begot of nothing but vain fantasy; which is as thin of substance as the air."
- Romeo & Juliet, Act I Scene iv Verse 96-99
9 REPLIES

Re: non-geometric components and UGOpen

The function NXOpen.UF.UFAssem.AskAllPartOccChildren() is the wrapped version.

 

Make sure to install all documentation packages to get the .NET documentation.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: non-geometric components and UGOpen

I don't know of a way to return the drafting components directly (which doesn't mean there isn't a way), but if you iterate through all the components, you can use the UF_DRAW_is_drafting_component function to differentiate the drafting components from the normal components.

Re: non-geometric components and UGOpen

This solves the opposite problem from what I have.  I don't care what kind of component it is; I just want its tag.  UF_ASSEM_ask_all_part_occ_children() doesn't give that.  As far as that function is concerned, non-geometric components don't exist.

--

Dennis Paul Himes
CSC

Disclaimer: "True, I talk of dreams; which are the children of an idle brain, begot of nothing but vain fantasy; which is as thin of substance as the air."
- Romeo & Juliet, Act I Scene iv Verse 96-99

Re: non-geometric components and UGOpen

 

Dennis,

 

Did you set this environment variable?

 

UGII_ALLOW_NGC_IN_UGOPEN=YES

 

I think that should allow it to work with your UF_ASSEM call.

 

Steve

 

 

Re: non-geometric components and UGOpen

I tried setting UGII_ALLOW_NGC_IN_UGOPEN=YES, but it had no effect.

--

Dennis Paul Himes
CSC

Disclaimer: "True, I talk of dreams; which are the children of an idle brain, begot of nothing but vain fantasy; which is as thin of substance as the air."
- Romeo & Juliet, Act I Scene iv Verse 96-99
Solution
Solution
Accepted by topic author himes
‎08-26-2015 04:32 AM

Re: non-geometric components and UGOpen

Did you re-start NX after you set that?  (It only reads the environment variables at startup.)  This has worked in our tests.  If it is failing after restarting, please create an IR with GTAC and provide a syslog from a session where it failed.

 

Thanks!

 

Re: non-geometric components and UGOpen

Thanks, that worked.  I was setting it programmatically using putenv() to see if it would work before adding it to our startup settings.  When I did the latter instead it worked.

--

Dennis Paul Himes
CSC

Disclaimer: "True, I talk of dreams; which are the children of an idle brain, begot of nothing but vain fantasy; which is as thin of substance as the air."
- Romeo & Juliet, Act I Scene iv Verse 96-99

Re: non-geometric components and UGOpen

Regular environment variable calls from the development language don't work, NX has its own ways of changing environment variables for the running session.

I even think many of them can't be changed at runtime anyways.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: non-geometric components and UGOpen

In case you are wondering, the call is (VB, common API interface)

UFSession.UF.SetVariable(...)

 

You can always play to see if it is used.  For example you CAN set

UGII_CAM_*  (at least UGII_CAM_POST_DIR, UGII_CAM_USER_DEF_EVENT_DIR, UGII_CAM_LIBRARY_INSTALLED_MACHINES_DIR)

and

UGII_UTIL

 

You may have to do something to get them "triggered" (in my can, I always choose a new CAM configuration, but I'm not 100% sure that step is needed)

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled