AddRectangularPattern : what it's wrong ?

AddRectangularPattern : what it's wrong ?

Anonymous
Not applicable
297 Views
0 Replies
Message 1 of 1

AddRectangularPattern : what it's wrong ?

Anonymous
Not applicable
Hi everyone.

I'm trying to use AddRectangularPattern. Following my code. AddRectangularPattern crash. what its wrong ? Can anyone help me. Thankyou in advance.

Ezio


////

CComPtr pEntityAsse( pSelectSet->GetItem(1)); /// WORK AXIS
CComPtr pEntityGradino( pSelectSet->GetItem(2)); /// COMPONENT OCCURENCE

CComPtr pFeatures;
hr=BaseObj.m_pAssemblyComponentDefinition->get_Features( &pFeatures);

///

CComPtr pTransientObjects;
pTransientObjects=m_pApplication->GetTransientObjects();

VARIANT vopt;
VariantInit(&vopt);
V_VT(&vopt) = VT_ERROR;
vopt.scode = DISP_E_PARAMNOTFOUND;

CComPtr pGradiniCollection;
hr=pTransientObjects->CreateObjectCollection( vopt, &pGradiniCollection);
hr=pGradiniCollection->Add( pEntityGradino);

VARIANT_BOOL nDirezione=TRUE;

CComPtr pOccurrencePatterns=BaseObj.m_pAssemblyComponentDefinition->GetOccurrencePatterns();

CComPtr pRectangularOccurrencePattern;

hr=pOccurrencePatterns->AddRectangularPattern( pGradiniCollection
, pEntityAsse
, nDirezione /// VARIANT_BOOL ColumnEntityNaturalDirection
, CComVariant( "rPatternPedata") /// const VARIANT & ColumnOffset
, CComVariant( "nAlzateCalcolateRampa1") /// const VARIANT & ColumnCount
, vtMissing /// const VARIANT & RowEntity
, vtMissing /// VARIANT_BOOL RowEntityNaturalDirection
, vtMissing /// const VARIANT & RowOffset
, vtMissing /// const VARIANT & RowCount
, &pRectangularOccurrencePattern);
0 Likes
298 Views
0 Replies
Replies (0)