Skip to main content
13-Aquamarine
Nov 15, 2019 10:33 AM UTC
Solved

How to read Part Sketch Information? Like points, lines, sketch planes.

Hi,

I've been working on reading Sketch from a part feature through API. With the APIs I can go upto Feature types and Subitems. In subitems I'm not able to find sketches.

 

Could anyone please help?

 

Thanks

zemanekpAnswer
14-Alexandrite
Nov 18, 2019 8:32 AM UTC

Hi,

you cannot access to the element tree or to sketcher entities through the VB API – COM object.

This is not free functionality. It‘s possible only with licensed APIs - TOOLKIT C/C++/Java.

I'm convinced;  see/compare the API doc for VB API vs. Object C++.

 

PZ

7 replies

2-Explorer
Nov 15, 2019 12:42 PM UTC

You cannot get sketch directly if same is used in extrude or other feature.

 

You have to identify type of feature first. Then extract element tree of feature to get element of sketch. From sketch, you can get lines and arcs which all are available.

Translate
hsb713-AquamarineAuthor
13-Aquamarine
Nov 15, 2019 12:47 PM UTC

Hi,

Thank you for the reply.

Under each feature there is an option to get Subitems. But while selecting subitems there is no feature to select 'Sketch'. There are options for points, dimensions as ModelItems. Could you please direct me towards any option?

I'm using API COM refernce with C#.

Thanks

Translate
2-Explorer
Nov 15, 2019 12:53 PM UTC

I am sorry as i would not able to help you on those APIs. I am into toolkit API of C++.

Translate
RPN
18-Opal
Nov 16, 2019 4:29 PM UTC

As Long you read only

ProFeatureNumSectionsGet (ProFeature *feat_handle,int *p_n_sections);

next

ProFeatureSectionCopy (ProFeature *feat_handle,int section_number,ProSection *p_section);

Now you have a section copy.

Translate
hsb713-AquamarineAuthor
13-Aquamarine
Nov 18, 2019 7:20 AM UTC

Hi,

Thanks for the reply. The methods you mentioned are with using ProToolKit but I'm using APIs with C#.

How can do the process with APIs?

Translate
zemanekp14-AlexandriteAnswer
14-Alexandrite
Nov 18, 2019 8:32 AM UTC

Hi,

you cannot access to the element tree or to sketcher entities through the VB API – COM object.

This is not free functionality. It‘s possible only with licensed APIs - TOOLKIT C/C++/Java.

I'm convinced;  see/compare the API doc for VB API vs. Object C++.

 

PZ

Translate