Reply

two questions with vc++ to develop se

[ Edited ]

 

 I develop solidedge with VC++. i have two questions as follow:

 1. i want to create a BSplineCurve,the code is as follow.but the BSplineCurve can not be created.i can create line,circle and arc,but

the BSplineCurve can not be created.

 double nData[10]={0.01,0.01,0.03,0.02,0.04,0.01,0.05,0.08,0.07,0.04}; /// coodinate of x and y for BSplineCurve

SAFEARRAY* pArray=NULL; /// initialize the  SAFEARRAY

HRESULT hr=SafeArrayAllocDescriptor(1,&pArray);// create SAFEARRAY 

if(hr!=S_OK)

//return;

pArray->cbElements=sizeof(nData[0]);

pArray->rgsabound[0].cElements=10;

pArray->rgsabound[0].lLbound=0;

SafeArrayAllocData(pArray);//

pArray->pvData=nData;

pArray->fFeatures=FADF_AUTO|FADF_FIXEDSIZE;//

......

......

BSplineCurves2dPtr  pBSplineCurves2d1;

pBSplineCurves2d1=pProfile1->GetBSplineCurves2d();///

BSplineCurve2dPtr  pBSplineCurve2d1;

pBSplineCurve2d1=pBSplineCurves2d1->AddByPoints(4,5,&pArray);

2. i want to create a parallel refplane ,  the code is as follow:

pRefPlane2=pRefPlanes1->AddParallelByDistance(pRefPlane1,0.01,igLeft,true);/// this sentence occurs error

the error message is as follow:

error C2664: 'AddParallelByDistance' : cannot convert parameter 3 from 'enum SolidEdgePart::FeaturePropertyConstants' to 'enum SolidEdgePart::ReferenceElementConstants'

the input igLeft, i find it is used in VB, why it can not be used in VC?

 

Posted by: wb w
Post date: 5/25/2009 3:14:31 AM

2 REPLIES

RE: two questions with vc++ to develop se

[ Edited ]

I have an answer to question 2.

It seems that VB6 is more permisive than the actual VS tools.

Consult the Se SDK help.

ReferenceElementsConstants applicable here are:

igNormalSide=2

igReverseNormalSide=1

 

VB6 accepted igLeft because igLeft=1. It didn't care if it belongs to a n enum collection or another.

 

Regards,

Julian

 

 

Posted by: Julian Guillo
Post date: 5/25/2009 7:17:51 AM

RE: two questions with vc++ to develop se

[ Edited ]

i had used the igNormalSide or igReverseNormalSide,but the refplane can not be created.

 

Posted by: wb w
Post date: 5/26/2009 3:35:51 AM