예제 #1
0
        public void PrintTestData(string variableName)
        {
            string     className      = base.GetType().ToString();
            StackTrace trace          = new StackTrace(true);
            int        fileLineNumber = trace.GetFrame(1).GetFileLineNumber();
            int        status         = JAM_test_print_ptr_of_class(this.pointer, className, variableName, fileLineNumber);

            if (status != 0)
            {
                throw NXException.Create(status);
            }
        }
예제 #2
0
파일: EX.cs 프로젝트: suifengsigan/TEST_1
        public static NXOpen.Section Section(this NXOpen.Features.DatumAxisBuilder obj)
        {
            IntPtr ptr;

            JAM.StartCall();
            int status = JA_DATUM_AXIS_BUILDER_get_section(JAM.Lookup(obj.Tag), out ptr);

            if (status != 0)
            {
                throw NXException.Create(status);
            }
            return((NXOpen.Section)NXObjectManager.Get(JAM.Lookup(ptr)));
        }
예제 #3
0
파일: EX.cs 프로젝트: suifengsigan/TEST_1
        //public static NXOpen.GeometricUtilities.BoundingObjectBuilder CreateBoundingObjectBuilder(this NXOpen.Part obj)
        //{
        //    IntPtr ptr;
        //    JAM.StartCall("solid_modeling");
        //    int status = JA_PART_create_bounding_object_builder(obj.Tag, out ptr);
        //    if (status != 0)
        //    {
        //        throw NXException.Create(status);
        //    }
        //    return (NXOpen.GeometricUtilities.BoundingObjectBuilder)NXObjectManager.Get(JAM.Lookup(ptr));
        //}
        public static NXOpen.Section[] GetSections(this NXOpen.Features.Feature obj)
        {
            int num;

            JAM.StartCall("solid_modeling", "cam_base");
            IntPtr zero   = IntPtr.Zero;
            int    status = JA_FEATURE_get_sections(obj.Tag, out num, out zero);

            if (status != 0)
            {
                throw NXException.Create(status);
            }
            return((NXOpen.Section[])JAM.ToObjectArray(typeof(NXOpen.Section), num, zero));
        }
예제 #4
0
파일: EX.cs 프로젝트: suifengsigan/TEST_1
        public static NXOpen.BlockStyler.SnapBlockDialog CreateSnapDialog(this NXOpen.UI ui, string dialogName)
        {
            IntPtr ptr2;

            JAM.StartCall();
            IntPtr ptr    = JAM.ToLocaleString(dialogName);
            int    status = JA_UI_MAIN_create_snap_dialog(ptr, out ptr2);

            JAM.FreeLocaleString(ptr);
            if (status != 0)
            {
                throw NXException.Create(status);
            }
            return(new SnapBlockDialog(ptr2));
        }
예제 #5
0
            public bool MoveNext()
            {
                if (this.finished)
                {
                    return(false);
                }
                int status = this.context.EnumerateMoveNext(ref this.currentTag, this.state);

                if (status != 0)
                {
                    throw NXException.Create(status);
                }
                this.finished = this.currentTag == Tag.Null;
                return(!this.finished);
            }