NX9 Journal - Weight as reported in assembly navigator
NX9 Journal - Weight as reported in assembly navigator
(OP)
I've seen this thread http://www.eng-tips.com/viewthread.cfm?qid=342629 from 2013 which tries to answer ways to get the weight from components in an assembly.
Now I see that the weight can be reported out as a column in the assembly navigator, so I have assumed there is a simple component property that I can query in an NX Journal. However, I can't figure out what that would be.
Am I out to lunch, or is this possible? Note, I tried:
But I just get the error that "Expression does not produce a value".
Thanks in advance,
Jeff
Now I see that the weight can be reported out as a column in the assembly navigator, so I have assumed there is a simple component property that I can query in an NX Journal. However, I can't figure out what that would be.
Am I out to lunch, or is this possible? Note, I tried:
CODE
CPTMASS=ufs.weight.askprops(c.tag,units,weight)
But I just get the error that "Expression does not produce a value".
Thanks in advance,
Jeff





RE: NX9 Journal - Weight as reported in assembly navigator
CODE
The value(s) will be returned via the properties variable that was passed into the function (in this case, the one named "weight"). Be aware that the "weight" variable will need to be declared as a "UFWeight.Properties" structure as opposed to a simple "double" type variable.
www.nxjournaling.com
RE: NX9 Journal - Weight as reported in assembly navigator
I also ran the Weight Management function through the NX menus it gives me 0.0 - so from where is the assembly navigator getting the value?
Thanks,
Jeff
RE: NX9 Journal - Weight as reported in assembly navigator
www.nxjournaling.com
RE: NX9 Journal - Weight as reported in assembly navigator
Okay, so here is what I tried - I'm missing something again, cause it doesn't work still (it always reports "MASS NOT FOUND"):
CODE
(I don't really know what the InitExceptions and FreeExceptions are there for, I just read that I need them)
I'm also realizing that I am locking myself into having an advanced assemblies license available when running this journal...I was hoping that wouldn't be the case...
Thanks,
Jeff
RE: NX9 Journal - Weight as reported in assembly navigator
Unfortunately, I don't currently have access to an advanced assembly license to do any testing.
www.nxjournaling.com
RE: NX9 Journal - Weight as reported in assembly navigator
Anyways, it reports "SafeArray cannot be marshaled to this array type because it has either nonzero lower bounds or more than one dimension."
I commented out the other lines and just left the first one 'InitExceptions' so I would know which line is triggering. As I said, I don't even know what these are for...
Thanks,
Jeff
RE: NX9 Journal - Weight as reported in assembly navigator
www.nxjournaling.com
RE: NX9 Journal - Weight as reported in assembly navigator
I've got it working now.
Thanks cowski!
Jeff
RE: NX9 Journal - Weight as reported in assembly navigator
CODE
But it seems that unless I make this component the work part and then set the weight management reference set, it doesn't update correctly. While I guess I could make each component the work part before I set the reference set, that seems like a very inefficient way to go about the problem.
So if there are other ideas how to do this, I'm all ears.
Thanks,
Jeff
RE: NX9 Journal - Weight as reported in assembly navigator
{component part reference}.LoadFully
or
{component part reference}.LoadThisPartFully
www.nxjournaling.com
RE: NX9 Journal - Weight as reported in assembly navigator
Now if only there was a way to do this without Advanced Assemblies...sigh...
Jeff
RE: NX9 Journal - Weight as reported in assembly navigator
www.nxjournaling.com