Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
hope everyone is doing alright. i am working on a ilogic rule for creating a drawing package, and it is coming along quite well. i am having one issue where i want to suppress some features in the view model based on certain criteria. my issue is i can't figure out how to get the feature suppress. i can update parameters OK, but this is giving me issues. i keep getting an error on the 'hole_suppress.Add' line...
"Error on Line 186 : Argument not specified for parameter 'Index' of 'Public ReadOnly Default Property Item(Index As Object) As Inventor.PartFeature'. "
Dim oPartDef_FORM As PartComponentDefinition oPartDef_FORM = oModel_formed.ComponentDefinition oBaseView_FORMED = NewSheet.DrawingViews.AddBaseView(oModel_formed, oPoint3, 1 / 30, ktopViewOrientation, kHiddenLineRemovedDrawingViewStyle, , , oBaseViewOptions) oBaseView_FORMED.RotateByAngle(PI) ' ' NOW PASS PARAMETERS TO FORMED PART ' oPart_F = oBaseView_FORMED.ReferencedDocumentDescriptor.ReferencedDocument propSet = oPart_F.PropertySets.Item("Inventor User Defined Properties") oPartDef_FORM.Parameters.Item("CROWN_RADIUS").Value = c_rad_1 oPartDef_FORM.Parameters.Item("INSIDE_RADIUS").Value = H_RAD_1 oPartDef_FORM.Parameters.Item("PITCH").Value=PITCH_V oPartDef_FORM.Parameters.Item("NUMB_S_HAUNCH").Value=H_RAD_H oPartDef_FORM.Parameters.Item("NUMB_S").Value=TOT_S oPartDef_FORM.Parameters.Item("DEPTH").Value=DEPTH_V oPartDef_FORM.Parameters.Item("CIRC_HOLE_SP").Value=CIR_HOLE_SP_V oPartDef_FORM.Parameters.Item("FLAT_SPOT").Value=FLAT_SPOT_V oPartDef_FORM.Parameters.Item("LEG_S").Value=LEG_S_V oPartDef_FORM.Parameters.Item("LEG").Value = LEG_LENGTH_V oPartDef_FORM.Parameters.Item("THICKNESS").Value = THICKNESS_V Dim hole_suppress As ObjectCollection hole_suppress.Add oPartDef_FORM.Features.Item.Name("HAUNCH_SIDE_HOLES") If LEG_S_V <= 1 Then oPartDef_FORM.SuppressFeatures(hole_suppress) End If
as always, any help/insight is greatly appreciated!
Solved! Go to Solution.