Home
Reply
Regular Contributor
yadongshen
Posts: 44

trouble in postion class

Hi,

 

I attempted to create a cone by using api_solid_cylinder_cone(position(40,40,40),position(100,100,100)....)

I included the position.hxx in Header files as well as header declare (#include "position.hxx")

 

After i built my program, an error said that error C3861: 'position': identifier not found

 

Why is that? I am using ACIS_R22 and VS2005

 

My orignial code is attached. Thanks in advance.

 

 

 

#include <stdio.h>

#include "stdafx.h"

#include "acis.hxx"

#include "api.hxx"

#include "kernapi.hxx"

#include "cstrapi.hxx"

#include "body.hxx"

#include "debug.hxx"

#include "position.hxx"

 

// Declaration of the ACIS licensing function.

void unlock_spatial_products_4207();

 

void main()

{

 

unlock_spatial_products_4207();

 

outcome res = api_start_modeller(0);

if(!res.ok()){ printf("Error Starting Modeller\n"); exit(1);}

 

res = api_initialize_constructors();

if(!res.ok()){printf("Error in api_initialize_constructors\n");exit(1);}

 

BODY *hat;

api_solid_cylinder_cone(position(40,40,40),position(100,100,100),10*M_PI,20*M_PI,0,NULL,hat);

 

double area = 0;

double accuracy = 0;

api_ent_area((ENTITY*)block,0.01,area,accuracy);

printf("The surface area of the cone is = %f\n",area);

getchar();

 

res = api_terminate_constructors();

if(!res.ok()){printf("Error in api_terminate_constructors\n"); exit(1);}

 

res = api_stop_modeller();

if(!res.ok()){printf("Error Stopping Modeller\n");exit(1);}

 

}

 

AR
Contributor
AR
Posts: 23

Re: trouble in postion class

Its "SPAposition" and not "position".

 

Did the make_cuboid example work?

 

AR

Regular Contributor
yadongshen
Posts: 44

Re: trouble in postion class

Hi AR,

 

thanks for your continuous help.

SPApoistion worked!!!