2025.6.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/***********************************************************************************************************************
|
||||
*
|
||||
* Copyright (c) 2010 - 2022 by Tech Soft 3D, Inc.
|
||||
* Copyright (c) 2010 - 2025 by Tech Soft 3D, Inc.
|
||||
* The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., and considered a trade secret
|
||||
* as defined under civil and criminal statutes. Tech Soft 3D shall pursue its civil and criminal remedies in the event
|
||||
* of unauthorized use or misappropriation of its trade secrets. Use of this information by anyone other than authorized
|
||||
@@ -18,6 +18,7 @@ Demonstrates how to create a PDF document with layers automatically handled by d
|
||||
#define INITIALIZE_A3D_API
|
||||
#define HOOPS_PRODUCT_PUBLISH_ADVANCED
|
||||
#include <A3DSDKIncludes.h>
|
||||
#include <hoops_license.h>
|
||||
#include "../common.hpp"
|
||||
#include "../CommonInit.h"
|
||||
|
||||
@@ -192,7 +193,7 @@ A3DStatus BuildPDFDocument()
|
||||
|
||||
A3DPDFListBoxData sListData;
|
||||
A3D_INITIALIZE_DATA(A3DPDFListBoxData, sListData);
|
||||
sListData.m_pcName = "ListViews";
|
||||
sListData.m_pcName = const_cast<A3DUTF8Char*>("ListViews");
|
||||
sListData.m_bHasBorder = TRUE;
|
||||
A3DPDFListBox* pListBoxViews = NULL;
|
||||
|
||||
@@ -215,7 +216,7 @@ A3DStatus BuildPDFDocument()
|
||||
|
||||
A3DPDFListBoxData sListData2;
|
||||
A3D_INITIALIZE_DATA(A3DPDFListBoxData, sListData2);
|
||||
sListData2.m_pcName = "ListPmis";
|
||||
sListData2.m_pcName = const_cast<A3DUTF8Char*>("ListPmis");
|
||||
sListData2.m_bHasBorder = TRUE;
|
||||
A3DPDFListBox* pListBoxPMIs = NULL;
|
||||
|
||||
@@ -255,21 +256,21 @@ A3DStatus BuildPDFDocument()
|
||||
A3DPDFLayer* pLayerPMISlot = NULL;
|
||||
A3DPDFLayerData sLayerData;
|
||||
A3D_INITIALIZE_DATA(A3DPDFLayerData, sLayerData);
|
||||
sLayerData.m_pcName = "LayerSlot";
|
||||
sLayerData.m_pcName = const_cast<A3DUTF8Char*>("LayerSlot");
|
||||
sLayerData.m_bIsVisible = FALSE;
|
||||
CHECK_RET(A3DPDFLayerCreate(pDoc, &sLayerData, &pLayerPMISlot));
|
||||
apLayerGroup[0] = pLayerPMISlot;
|
||||
|
||||
A3DPDFLayer* pLayerPMIFlat = NULL;
|
||||
A3D_INITIALIZE_DATA(A3DPDFLayerData, sLayerData);
|
||||
sLayerData.m_pcName = "LayerFlat";
|
||||
sLayerData.m_pcName = const_cast<A3DUTF8Char*>("LayerFlat");
|
||||
sLayerData.m_bIsVisible = FALSE;
|
||||
CHECK_RET(A3DPDFLayerCreate(pDoc, &sLayerData, &pLayerPMIFlat));
|
||||
apLayerGroup[1] = pLayerPMIFlat;
|
||||
|
||||
A3DPDFLayer* pLayerPMIHole = NULL;
|
||||
A3D_INITIALIZE_DATA(A3DPDFLayerData, sLayerData);
|
||||
sLayerData.m_pcName = "LayerHole";
|
||||
sLayerData.m_pcName = const_cast<A3DUTF8Char*>("LayerHole");
|
||||
sLayerData.m_bIsVisible = FALSE;
|
||||
CHECK_RET(A3DPDFLayerCreate(pDoc, &sLayerData, &pLayerPMIHole));
|
||||
apLayerGroup[2] = pLayerPMIHole;
|
||||
@@ -317,7 +318,7 @@ A3DStatus BuildPDFDocument()
|
||||
sTextFieldData.m_sTextColor.m_dGreen = 0;
|
||||
sTextFieldData.m_sTextColor.m_dBlue = 0;
|
||||
sTextFieldData.m_eTextAlignment = kA3DPDFLeft;
|
||||
sTextFieldData.m_pcDefaultValue = "";
|
||||
sTextFieldData.m_pcDefaultValue = const_cast<A3DUTF8Char*>("");
|
||||
A3DPDFRectData sPosTxt;
|
||||
A3D_INITIALIZE_DATA(A3DPDFRectData, sPosTxt);
|
||||
|
||||
@@ -325,8 +326,8 @@ A3DStatus BuildPDFDocument()
|
||||
sPosTxt.m_iRight = sPosTxt.m_iLeft + 50; // upper right x
|
||||
sPosTxt.m_iTop = 152; // upper right y
|
||||
sPosTxt.m_iBottom = sPosTxt.m_iTop - 15; // lower left y
|
||||
sTextFieldData.m_pcDefaultValue = "";
|
||||
sTextFieldData.m_pcName = "Slot.CenterX"; //sTextFieldName.c_str();
|
||||
sTextFieldData.m_pcDefaultValue = const_cast<A3DUTF8Char*>("");
|
||||
sTextFieldData.m_pcName = const_cast<A3DUTF8Char*>("Slot.CenterX"); //sTextFieldName.c_str();
|
||||
A3DPDFTextField* pTextSlotCx = NULL;
|
||||
CHECK_RET(A3DPDFTextFieldCreate(pDoc, &sTextFieldData, &pTextSlotCx));
|
||||
CHECK_RET(A3DPDFPageInsertTextField(pPage, pTextSlotCx, &sPosTxt));
|
||||
@@ -337,8 +338,8 @@ A3DStatus BuildPDFDocument()
|
||||
sPosTxt.m_iRight = sPosTxt.m_iLeft + 50; // upper right x
|
||||
sPosTxt.m_iTop = 129; // upper right y
|
||||
sPosTxt.m_iBottom = sPosTxt.m_iTop - 15; // lower left y
|
||||
sTextFieldData.m_pcDefaultValue = "";
|
||||
sTextFieldData.m_pcName = "Flat.CenterX"; //sTextFieldName.c_str();
|
||||
sTextFieldData.m_pcDefaultValue = const_cast<A3DUTF8Char*>("");
|
||||
sTextFieldData.m_pcName = const_cast<A3DUTF8Char*>("Flat.CenterX"); //sTextFieldName.c_str();
|
||||
A3DPDFTextField* pTextFlatCx = NULL;
|
||||
CHECK_RET(A3DPDFTextFieldCreate(pDoc, &sTextFieldData, &pTextFlatCx));
|
||||
CHECK_RET(A3DPDFPageInsertTextField(pPage, pTextFlatCx, &sPosTxt));
|
||||
@@ -349,8 +350,8 @@ A3DStatus BuildPDFDocument()
|
||||
sPosTxt.m_iRight = sPosTxt.m_iLeft + 50; // upper right x
|
||||
sPosTxt.m_iTop = 143; // upper right y
|
||||
sPosTxt.m_iBottom = sPosTxt.m_iTop - 15; // lower left y
|
||||
sTextFieldData.m_pcDefaultValue = "";
|
||||
sTextFieldData.m_pcName = "Hole.CenterX"; //sTextFieldName.c_str();
|
||||
sTextFieldData.m_pcDefaultValue = const_cast<A3DUTF8Char*>("");
|
||||
sTextFieldData.m_pcName = const_cast<A3DUTF8Char*>("Hole.CenterX"); //sTextFieldName.c_str();
|
||||
A3DPDFTextField* pTextHoleCx = NULL;
|
||||
CHECK_RET(A3DPDFTextFieldCreate(pDoc, &sTextFieldData, &pTextHoleCx));
|
||||
CHECK_RET(A3DPDFPageInsertTextField(pPage, pTextHoleCx, &sPosTxt));
|
||||
@@ -464,7 +465,7 @@ int main(int, A3DUTF8Char**)
|
||||
#endif
|
||||
|
||||
// init A3DLIB library - automatically handled init/terminate
|
||||
A3DSDKHOOPSPublishLoader sHoopsPublishLoader(_T(HOOPS_BINARY_DIRECTORY));
|
||||
A3DSDKHOOPSPublishLoader sHoopsPublishLoader(_T(HOOPS_BINARY_DIRECTORY), HOOPS_LICENSE);
|
||||
CHECK_RET(sHoopsPublishLoader.m_eSDKStatus);
|
||||
|
||||
CHECK_RET(A3DDllSetCallbacksMemory(CheckMalloc, CheckFree));
|
||||
|
||||
Reference in New Issue
Block a user