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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

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

hsb7
12-Amethyst

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

ACCEPTED SOLUTION

Accepted Solutions
zemanekp
13-Aquamarine
(To:hsb7)

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

View solution in original post

7 REPLIES 7
Ketan_Lalcheta
19-Tanzanite
(To:hsb7)

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.

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

Ketan_Lalcheta
19-Tanzanite
(To:hsb7)

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

Okay. Cool.

RPN
17-Peridot
17-Peridot
(To:hsb7)

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.

hsb7
12-Amethyst
(To:RPN)

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?

zemanekp
13-Aquamarine
(To:hsb7)

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

Announcements


Top Tags