- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hI @earl_cody ,
Thanks again for your help with this. i have the code in iLogic and it works great when i run it interactively, (manually pick planes and surface). however, i am trying to hard code the plane in as they are always the same two, just the surface changes. however, i am having an issue assigning them. i can cycle thru the assy and find the planes, think i am assigning them correctly, but the axis is drawn thru the XZ and XY planes not the XZ and INSIDE RISE-AREA. i assume i am doing something wrong here in this For loop, but not sure what. i've also attached a zip file with my test assembly
For Each oWorkPlane In asmdoc.ComponentDefinition.WorkPlanes Logger.Debug(oWorkPlane.Name & "...." & I) If InStr(oWorkPlane.name, "YZ Plane") Then Logger.Debug(oWorkPlane.Name & "... plane 1" ) planeOne = oWorkPlane End If If InStr(oWorkPlane.name, "INSIDE AREA-RISE") Then 'oworkPlane.delete Logger.Debug(oWorkPlane.name)' & oWorkPlane.ITEM()) planeTwo = oWorkPlane Logger.Debug(planeTwo.Name & ".....PLANE 2..." & planeOne.Name) End If I = I+1 Next ' planeOne = inv.CommandManager.Pick(kWorkPlaneFilter, "pick first plane") ' THESE WORK IF UNCOMMENTED ' planeTwo = inv.CommandManager.Pick(kWorkPlaneFilter, "pick second plane") ' THESE WORK IF UNCOMMENTED
again, really appreciate your help with this. the planes are in the top level assembly, so i shouldn't need a Proxy? or do I? or do i need to assign planeOne and PlaneTwo by another means, such as
"planeTwo = asmdoc.ComponentDefinition.WorkPlanes.Item(I)" ? (have tried this but not luck)....
Any insight as to why this works interactively but not hard code would save me some grey matter :+)
than ks to All for looking!