Message 1 of 4
Set PunchToolFeature PunchID

Not applicable
09-20-2010
10:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Writing a routine to insert PunchTools and wanting to set the punchID at insertion time. Can get the tool to insert no problem but can only find the PunchID as a property of the ifeature and its read only. Any suggestions on how to do this?
SheetMetalComponentDefinition smdef = (SheetMetalComponentDefinition)sheetMetalPart.ComponentDefinition;
SheetMetalFeatures smfeatures = (SheetMetalFeatures)smdef.Features;
iFeatureDefinition ifeatureDef = smfeatures.PunchToolFeatures.CreateiFeatureDefinition(toolFeatureLocation);
ifeatureDef.PunchId="6.35"; ///Comiler errors here with Property is read only error
PunchToolFeature ptf = smfeatures.PunchToolFeatures.Add(punchCentres, ifeatureDef, 0);