点击查看详细介绍

UG二次开发NXOpen c++导出STP程序代码 精华帖

nxopen 7年前 8942 37

购买与咨询 NX 二次开发视频教程,请联系微信号:13890821008  QQ号:85585969  


//UG二次开发NXOpen导出STP程序代码
//需要的头文件
#include <uf_defs.h>
#include <NXOpen/NXException.hxx>
#include <NXOpen/Session.hxx>
#include <NXOpen/Builder.hxx>
#include <NXOpen/DexManager.hxx>
#include <NXOpen/NXObject.hxx>
#include <NXOpen/ObjectSelector.hxx>
#include <NXOpen/ObjectTypeSelector.hxx>
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/SelectNXObjectList.hxx>
#include <NXOpen/Session.hxx>
#include <NXOpen/Step214Creator.hxx>
//C++程序代码
Step214Creator *step214Creator1;
step214Creator1 = theSession->DexManager()->CreateStep214Creator();
//设置要被导出的PRT
step214Creator1->SetInputFile("E:\\NXdata\\UGpart\\NX7.5\\constrainTemp3\\assmRoot.prt");
//设置导出的位置和文件名
step214Creator1->SetOutputFile("E:\\test\\4\\assmRoot.stp");
step214Creator1->ObjectTypes()->SetCurves(true);
step214Creator1->ObjectTypes()->SetSurfaces(true);
step214Creator1->ObjectTypes()->SetSolids(true);
step214Creator1->ObjectTypes()->SetCsys(true);
step214Creator1->ObjectTypes()->SetProductData(true);
step214Creator1->SetValidationProperties(true);

●●●请先 登陆注册 后查看●●●

step214Creator1->SetValidationProperties(false);
step214Creator1->SetFileSaveFlag(false);
step214Creator1->SetLayerMask("1-256");
NXObject *nXObject1;
nXObject1 = step214Creator1->Commit();
step214Creator1->Destroy();

7

最新回复 (37)
  • licxsw 7年前
    1

    xxxxxsdfdsafdasfda

  • jamsona 7年前
    2

    学习学习,谢谢分享。。。

  • zby186 VIP会员 7年前
    3

    学习学习,谢谢分享。。。永远支持你

  • HYZ谢谢 6年前
    4

    导出STP程序代码

  • buzhidaohuy 6年前
    5

    谢谢分享,学习一下

  • enricyx VIP会员 6年前
    6

    学习,学习。。。。必须支持。。。。。。。。。。

  • jimypeng 6年前
    7

    学习学习,谢谢分享。。。永远支持你

  • 烟雨雾 6年前
    8

    谢谢分享,学习一下

  • king_chinese VIP会员 6年前
    9

    学习学习,谢谢分享。。。

  • 不及无耐 VIP会员 6年前
    10

    感谢楼主分享,多向楼主学习!楼主最棒!

  • boyue 5年前
    11

    学习学习,谢谢分享

  • 桃花一笑 5年前
    12

    好资料,慢慢看,感谢分享

  • 王牌飞行员 VIP会员 5年前
    13

    ID王牌飞行员学习打卡-20200326 生命不息,学习不止,谢谢楼主分享!!!

  • xiaolu VIP会员 5年前
    14

    学习学习,谢谢分享。。。

  • enricyx VIP会员 5年前
    15

    感谢分享。。。。。学习,学习。。。

请登录后发表新帖