I'm trying to use the Visual Basic API with VBA, through excel, to add features to layers. For simplicity, lets say I want to add all the datum planes to my layer ALL_PLANES.
This is what I have
Dim datumplanelist As IpfcFeatures
Dim addfeature As ipfcmodelitem
Dim pl As Long
'Put datum plane features into a sequence
Set datumplanelist = Solid.ListFeaturesByType(False, EpfcFEATTYPE_DATUM_PLANE)
'run through each of the items from datumplanelist and add to layer ALL_PLANES
For pl = 0 To datumplanelist.Count - 1
Set addfeature = datumplanelist.item(pl)
'**problem HERE \/
Planes.AddItem (addfeature)
Next
It is giving me that the addfeature variable is throwing the compile error "Method or data member not found"
it does the same thing if addfeature is defined as IpfcFeature
Thanks
This is what I have
Dim datumplanelist As IpfcFeatures
Dim addfeature As ipfcmodelitem
Dim pl As Long
'Put datum plane features into a sequence
Set datumplanelist = Solid.ListFeaturesByType(False, EpfcFEATTYPE_DATUM_PLANE)
'run through each of the items from datumplanelist and add to layer ALL_PLANES
For pl = 0 To datumplanelist.Count - 1
Set addfeature = datumplanelist.item(pl)
'**problem HERE \/
Planes.AddItem (addfeature)
Next
It is giving me that the addfeature variable is throwing the compile error "Method or data member not found"
it does the same thing if addfeature is defined as IpfcFeature
Thanks