Message 1 of 1
Miter two parts from an assembly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys,
This is the first time posting to a forum, but I am having trouble even getting started with this. I am trying to create a command that will miter two parts in a sub assembly from the top level assembly.
I am thinking that you can pick the 2 faces of the parts and create a bisecting work Plane, use that to trim the parts.
But I'm having trouble even starting to write this code.
This should be the simplest part just getting creating a work plane, but I can't even get this to work, never mind getting it to work from an assembly.
Could someone tell me what I'm doing wrong with this code, to start with?
Dim oDoc As PartDocument oDoc = ThisDoc.Document Dim oDef As PartComponentDefinition oDef = oDoc.ComponentDefinition Dim Face1 As Object Face1 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities, "Select Face 1") Dim Face2 As Object Face2 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities, "Select Face 2") Dim Point As Object 'Point = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPointEntities, "Select A Point") Point = oDef.WorkPoints("Center Point") Dim oWPlane As WorkPlane oWPlane = oDef.WorkPlanes.AddByTwoPlanes(Face1, Face2,Point)
Thank you for any help you can give me.