Question about "CreateDefinition" (VBA)

Hello

New day, new question!

I'll need to use CreateDefinition to insert a datum plane

Here is the snippet of code: 

boolstatus = swModel.Extension.SelectByID2("dessus@Empreinte-1@Simulateur Plan", "PLANE", 0, 0, 0, True, 0, Nothing, 0)
Set swFeatMgr = swModel.FeatureManager
Set swFeatData = swFeatMgr.CreateDefinition(swFeatureNameID_e.swFmRefPlane)

 

Logically, then I should have this kind of thing: 

swFeatData. definition 1 = X

swFeatData. definition 2 = Y

etc etc

and finally: 

Set swFeat = swFeatMgr.CreateFeature(swFeatData)
 

However, it is impossible to find the names of the famous definitions in the API help. 

I tried using the arguments of the method to insert a reference plane (InsertRefPlane) but it doesn't work. 

 

My question: Where can I find in the help what goes with swFmRefPlane ? Even for the other definitions. Because it's still very practical. 

I do have the list of all the members of swFeatureeNameID_e but not the rest.

The famous list: http://help.solidworks.com/2019/english/api/swconst/SOLIDWORKS.Interop.swconst~SOLIDWORKS.Interop.swconst.swFeatureNameID_e.html

Kind regards

 

 

Good evening

See this link instead

1 Like

Thank you very much:)