SolidWorks Secondary Development - 08 - What is the characteristic of judgment?

xiaoxiao2021-03-05  22

Get a feature feature, how to determine if it is?

If we define a feature object:

DIM Curfeature as SLDWORKS.FEATURE

Then get this feature through Selectmgr, then you can use Feature.gettypename to determine that:

Select Case Curfeature.gettypename

CASE "CUT" 'A stretching transition feature

DO STH.

Case "HoleWzd" 'A profile feature

DO STH.

Case Else

End SELECT

End SELECT

This is the syntax:

SYNTAX (OLE Automation)

Retval = feature.gettypename ()

It will return one

(BSTR) RetVal

Feature Type as defined in bodyfeatures_e

Among them, Bodyfeatures_e content is more, it is not used here, you can refer to the SolidWorks API help.

(BSTR) RetVal

Feature Type as defined in bodyfeatures_e

Among them, Bodyfeatures_e content is more, it is not used here, you can refer to the SolidWorks API help.

转载请注明原文地址:https://www.9cbs.com/read-35304.html

New Post(0)