cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

X-Section

StephenGumbas
4-Participant

X-Section

Hello All,



I am merely trying to add a section on an existing datum plane in a new
assembly that I created. The following snippet of code is how I was
doing it. I was able to create the x-sec, but looking at it after the
fact (without toolkit, just Pro), it displays wrong in the assembly as
well as on a drawing. Plus if I try to alter the section Pro crashes.
Does anyone know a different approach I may take? Thanks.



ProError err;

ProError assy_err;

CString prt, prt2, prt3, prt4;

ProMdl mdl, comp1, comp2, comp3;

ProName asm_datums[3];

ProAssembly pasm;

ProSolid pcomp;

ProModelitem asm_datum;

ProSurface surf;

ProName sect;

int i_dtm;

ProXsec pxsec;

//

mdl = TkMdlRetrieve(m_sCompPath, prt);

comp1 = TkMdlRetrieve(m_sCompPath, prt2);

//

pasm = (ProAssembly)mdl;

ProStringToWstring(asm_datums[2], "ASM_RIGHT");

ProStringToWstring(sect, "A");

//

assy_err = ProModelitemByNameInit(pasm, PRO_SURFACE,
asm_datums[2], &asm_datum);

assy_err = ProGeomitemToSurface((ProGeomitem*)&asm_datum,
&surf);

assy_err = ProSurfaceIdGet(surf, &i_dtm);



ProXsecPlanarCreate((ProSolid)mdl, sect, i_dtm,
PRO_XSECTYPE_MODEL, NULL, &pxsec);





Best regards,



Stephen Gumbas

Enser Corp.

(856) 829-5522 ext 56




This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
0 REPLIES 0
Announcements
Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.

NEW Creo+ Topics:
PTC Control Center
Creo+ Portal
Real-time Collaboration