static void layer_copy(tag_t *objects, int n_objects, int to_layer)
{
double delta_zero[3] = { 0.0, 0.0, 0.0 },
double mx[16];
uf5943(delta_zero, mx);
int copy = 2;
int off = 2;
tag_t *copies;
int resp;
uf5947(mx, objects, &n_objects, ©, &to_layer, &off, &copies, NULL, &resp);
UF_free(copies);
}
//检查图层是否打开,没有就打开
static void openLayer(int lay)
{
Session* theSession = Session::GetSession();
Part* workPart(theSession->Parts()->Work());
int layerStatus = 0;
UF_LAYER_ask_status(lay, &layerStatus);
if (layerStatus != UF_LAYER_WORK_LAYER)
{
std::vector<Layer::StateInfo> stateArr(1, Layer::StateInfo(lay, Layer::StateSelectable));
workPart->Layers()->ChangeStates(stateArr, false);
}
}
【UG\NX二次开发】将对象复制到另一个图层、打开图层
于 2023-11-09 15:50:32 首次发布