Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor VBA list of "pick" filters

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
danijel.radenkovic
4250 Views, 8 Replies

Inventor VBA list of "pick" filters

Hello,

Can someone help me to find a list of VBA commands for selection ("pick") filters?

For example for select lines is: kSketchCurveLinearFilter

For face and edge selection is: kPartFaceFilter, kPartEdgeFilter

 

I can't find for work features, for work point selection? Is there a filter or I have to watch work points as objects and use ".Select(obj)"?

 

Danijel

 

 

 

Inventor 2018/Windows 10 x64
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
8 REPLIES 8
Message 2 of 9
Jef_E
in reply to: danijel.radenkovic

 

SelectionFilterEnum Enumerator

 

Description

Enumeration of the selection filters.

 

Methods

Name Value Description
kAllCircularEntities 18435 All circular entities filter.
kAllCustomGraphicsFilter 18436 All custom graphics.
kAllEntitiesFilter 18439 All entities filter(all entities should be selectable).
kAllLinearEntities 18433 All linear entities filter.
kAllPlanarEntities 18432 All planar entities filter.
kAllPointEntities 18434 All point entities filter.
kAssemblyFeatureFilter 16646 Assembly feature filter.
kAssemblyLeafOccurrenceFilter 16643 Assembly leaf occurrence filter.
kAssemblyOccurrenceFilter 16640 Assembly occurrence filter.
kAssemblyOccurrencePatternElementFilter 16645 Assembly occurrence pattern element filter.
kAssemblyOccurrencePatternFilter 16644 Assembly occurrence pattern filter.
kCustomBrowserNodeFilter 18437 Custom browser node.
kDrawingAutoCADBlockDefinitionFilter 16923 Drawing Block Definition filter.
kDrawingAutoCADBlockFilter 16922 Drawing Block Reference filter.
kDrawingBalloonFilter 16906 Drawing balloon filter.
kDrawingBorderDefinitionFilter 16909 Drawing border definition filter.
kDrawingBorderFilter 16913 Drawing Border instance filter.
kDrawingCenterlineFilter 16915 Drawing Centerline filter.
kDrawingCentermarkFilter 16916 Drawing Centermark filter.
kDrawingCurveSegmentFilter 16914 Drawing curve segment filter.
kDrawingCustomTableFilter 16905 Drawing custom table filter.
kDrawingDefaultFilter 16896 Drawing default filter.
kDrawingDimensionFilter 16900 Drawing dimension filter.
kDrawingFeatureControlFrameFilter 16918 Drawing feature control frame filter.
kDrawingHoleTableFilter 16902 Drawing hole table filter.
kDrawingHoleTagFilter 16903 Drawing hole tag filter.
kDrawingNoteFilter 16899 Drawing note filter.
kDrawingOriginIndicatorFilter 16920 Drawing OriginIndicator filter.
kDrawingPartsListFilter 16901 Drawing parts list filter.
kDrawingRevisionTableFilter 16904 Drawing revision table filter.
kDrawingSheetFilter 16897 Drawing sheet filter.
kDrawingSheetFormatFilter 16917 Drawing sheet format filter.
kDrawingSketchedSymbolDefinitionFilter 16908 Drawing sketched symbol definition filter.
kDrawingSketchedSymbolFilter 16907 Drawing sketched symbol filter.
kDrawingSurfaceTextureSymbolFilter 16919 Drawing surfacetexture symbol filter.
kDrawingTitleBlockDefinitionFilter 16910 Drawing title block definition filter.
kDrawingTitleBlockFilter 16912 Drawing title block instance filter.
kDrawingViewFilter 16898 Drawing view filter.
kDrawingViewLabelFilter 16921 Drawing surfacetexture symbol filter.
kFeatureDimensionFilter 18438 Feature dimension filter.
kPartBodyFilter 15890 Part body filter.
kPartDefaultFilter 15886 Part default filter.
kPartEdgeCircularFilter 15874 Part edge circular filter.
kPartEdgeFilter 15873 Part edge filter.
kPartEdgeLinearFilter 15875 Part edge linear filter.
kPartEdgeMidpointFilter 15876 Part edge midpoint filter.
kPartFaceConicalFilter 15880 Part face conical filter.
kPartFaceCylindricalFilter 15879 Part face cylindrical filter.
kPartFaceFilter 15877 Part face filter.
kPartFacePlanarFilter 15878 Part face planar filter.
kPartFaceSphericalFilter 15882 Part face spherical filter.
kPartFaceToroidalFilter 15881 Part face toroidal filter.
kPartFeatureFilter 15884 Part feature filter.
kPartSurfaceFeatureFilter 15885 Part surface feature filter.
kPartVertexFilter 15883 Part vertext filter.
kPointCloudFilter 15891 Point cloud filter.
kPointCloudPointFilter 15892 Point cloud point filter.
kSketch3DCurveCircularFilter 17666 3D Sketch curve circular filter.
kSketch3DCurveEllipseFilter 17667 3D Sketch curve ellipse filter.
kSketch3DCurveFilter 17664 3D Sketch curve filter.
kSketch3DCurveLinearFilter 17665 3D Sketch curve linear filter.
kSketch3DCurveSplineFilter 17668 3D Sketch curve spline filter.
kSketch3DDefaultFilter 17670 3D Sketch default filter.
kSketch3DDimConstraintFilter 17672 3D Sketch dimension constraint filter.
kSketch3DObjectFilter 17671 3D Sketch filter.
kSketch3DPointFilter 17669 3D Sketch point filter.
kSketch3DProfileFilter 17673 3D Sketch profile filter.
kSketchBlockDefinitionFilter 16141 SketchBlock definition filter.
kSketchBlockFilter 16142 SketchBlock filter.
kSketchCurveCircularFilter 16131 Sketch curve circular filter.
kSketchCurveEllipseFilter 16132 Sketch curve ellipse filter.
kSketchCurveFilter 16129 Sketch curve filter.
kSketchCurveLinearFilter 16130 Sketch curve linear filter.
kSketchCurveSplineFilter 16133 Sketch curve spline filter.
kSketchDefaultFilter 16135 Sketch default filter.
kSketchDimConstraintFilter 16128 Sketch dimension constraint filter.
kSketchImageFilter 16137 SketchImage filter.
kSketchObjectFilter 16136 Sketch filter.
kSketchPointFilter 16134 Sketch point filter.
kSketchProfileFilter 16139 2D Profile filter.
kSketchProjectedCutFilter 16140 ProjectedCut filter.
kSketchTextBoxFilter 16138 Sketch TextBox filter.
kUserCoordinateSystemFilter 16387 UserCoordinateSystem Filter.
kWorkAxisFilter 16384 Work axis filter.
kWorkPlaneFilter 16385 Work plane filter.
kWorkPointFilter 16386 Work point filter.

Version

Introduced in Inventor version 5



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
Message 3 of 9
danijel.radenkovic
in reply to: Jef_E

That's it!

Thank you a lot Jef.

 

Regards

Danijel

Inventor 2018/Windows 10 x64
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
Message 4 of 9
Anonymous
in reply to: Jef_E

Hi Jef,

 

I am Harish, CAD Design Engineer. I was looking for the below Pick filter list from many days, thank you for this usefull post.

I need one suggestion from you on this, I am working on a VBA, where i need to pick/Select only the Hole features in an assembly or part , please suggest me which filter i can use to select only the HOLE feature (kPartFaceCylindricalFilter doesn't work for me , bcoz, this filter selects even bend radius or fillet in my part)

 

Kindly need your suggestion.

 

Thank you..

 

Regards,

Harish Kumar M

 

 

Message 5 of 9
Jef_E
in reply to: Anonymous

There is no specific filter for HOLE features only. You can use kPartFeatureFilter and then validate the user selection.

 

If TypeOf SelectedFeature = HoleFeature Then
    ...
End If

 



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
Message 6 of 9
Anonymous
in reply to: Jef_E

Thank you for your suggestion Sir..

Will try to implement the same and let you know.

 

Thank you..

 

Regards,

Harish

Message 7 of 9
Anonymous
in reply to: Jef_E

Sir,

 

I am trying to pick all holes in part and create work axis for each hole by ilogic, But i am not getting exact ilogic code to do this.

 

Please need your suggestion or sample ilogic code to do this.

 

Thank you..

 

Regards,

Harish

Message 8 of 9
danijel.radenkovic
in reply to: Anonymous

Hello @Anonymous,

As @Jef_E said, you have to use "kPartFeatureFilter" to get all features and after you need to filter Hole Features by it's type.

Here is the VBA code:

Public Sub createHoleAxis()

    Dim oPartDoc As PartDocument
    Set oPartDoc = ThisApplication.ActiveDocument
    
    Dim oCompDef As ComponentDefinition
    Set oCompDef = oPartDoc.ComponentDefinition
   
    Dim oFeat As PartFeature
    Dim oWorkAxis As WorkAxis
    
    Dim i As Integer
    For i = 1 To oCompDef.Features.Count
 
    Set oFeat = oCompDef.Features(i)

    If TypeOf oFeat Is HoleFeature Then
    Set oWorkAxis = oCompDef.WorkAxes.AddByRevolvedFace(oFeat.Faces.Item(1), False)
    End If

    Next i

End Sub

With small modification, you can adapt it to iLogicL:

    Dim oPartDoc As PartDocument
    oPartDoc = ThisApplication.ActiveDocument
    
    Dim oCompDef As ComponentDefinition
    oCompDef = oPartDoc.ComponentDefinition
   
    Dim oFeat As PartFeature
    Dim oWorkAxis As WorkAxis
    
    Dim i As Integer
    For i = 1 To oCompDef.Features.Count
 
    oFeat = oCompDef.Features(i)

    If TypeOf oFeat Is HoleFeature Then
    oWorkAxis = oCompDef.WorkAxes.AddByRevolvedFace(oFeat.Faces.Item(1), False)
    End If

    Next i

Hope this helps!

Best,

Danijel

Inventor 2018/Windows 10 x64
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
Message 9 of 9
RoyWickrama_RWEI
in reply to: Jef_E

Thanks for the posting.

I would like to select the center of a circle (or center of arc).

 

Could you help, please.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report