Submitted by hoya on Fri, 03/15/2013 - 06:29
Forums:
Hi,
I have a very straightforward question:
I need to create a unit-object with NX-Journaling. What I found is the command
Session session = Session.GetSession();
SimPart workSimPart = (SimPart)session.Parts.BaseWork;
unit = workSimPart.UnitCollection.FindObject("MilliMeter"); (C#-Code)
The problem is that for the SimPart object I need some tools to be open in order to work. In my later code I do not really need workSimpart so my question is: Is there an alternative way of constructing a unit object without a SimPart-object?
thx in advance!
re: unit-object
Rather than using SimPart, use Part; it will also give you access to units.
Part workPart = (Part)session.Parts.BaseWork
unit = workPart.UnitCollection...