Hello everyone. I have a solid with a spherical face created from a revolution. This face is identified as Face1. I haven't been able to create the radius in the IDW with the following code: Dim COTA4_FE = COTAS_FE.AddRadius("raioelectrodo2", REF1_FE, Face1_VIEW01_FE). This is just a fragment of the final code that should generate the radius. I think the problem is that this type of spherical face does not accept the definition of Radius. But I also don't know what other syntax besides radius I could use. Has anyone experienced something similar? When running the code, the following error appears: System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.GeneralDimensions.AddRadius(Point2d TextOrigin, GeometryIntent Intent, Boolean ArrowheadsInside, Boolean LeaderFromCenter, Boolean Jogged, Object DimensionStyle, Object Layer)
at Autodesk.iLogic.Core.ManagedDrawing.ManagedGeneralDimensions.AddRadius(String name, RadiusDimensionTextPositionSpec textOrigin, GeometryIntent intent, Boolean arrowHeadsInside, Boolean leaderFromCenter, Boolean jogged, DimensionStyle dimensionStyle, Layer layer)
at ThisRule.Main() in rule: REGRA MASTER IDW, in document DESENHOS.idw:line 1608
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Solved by MjDeck. Go to Solution.
@heliston_guimaraes, I can confirm that I am seeing the same or similar results.
The green edge shown is a revolved edge, but works, but the red non-tangent revolved edge does not.
@MjDeck, if you have some time would you be able to tell us what is going on here?
See attached 2023 data set
The last line errors trying to place filletDim1 on the revolved surface face, but places dims on the other named faces
Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1") Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1") Dim Face1 = VIEW1.GetIntent("Face1") Dim Face2 = VIEW1.GetIntent("Face2") Dim Face3 = VIEW1.GetIntent("Face3") Dim Point1 = VIEW1.SheetPoint(1.1, 1.1) Dim Point2 = VIEW1.SheetPoint(-0.1, -0.1) Dim Point3 = VIEW1.SheetPoint(1.1, -0.1) Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions Dim filletDim3 = genDims.AddRadius("Fillet Radius3", Point3, Face3) Dim filletDim2 = genDims.AddRadius("Fillet Radius2", Point2, Face2) Dim filletDim1 = genDims.AddRadius("Fillet Radius1", Point1, Face1)
Hi @Curtis_Waguespack and @heliston_guimaraes , the trimmed spherical face on the left is rendered with two curves in the drawing. The first curve is the flat top of the cylinder. The second is the circle above it. iLogic will choose the first one by default. A radius dimension will fail on it because it's flat. To get the correct curve, use something like this:
Dim Face1 = VIEW1.GetIntent("Face1", nearPoint := VIEW1.SheetPoint(0.5, 1.1))
That tells the system: if you find more than one curve, choose the one whose bounding box center is closest to this point. In this case, that would be a point right above the view, in the center in the X direction. It should generally be possible to specify a point like this so as to get the curve you want.
Thanks @MjDeck !
That explanation helps a lot.
Working example for the previously attached example, in case it helps someone in the future:
Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1")
Dim Point1 = VIEW1.SheetPoint(0.3, 1.1)
Dim Point2 = VIEW1.SheetPoint(-0.1, -0.1)
Dim Point3 = VIEW1.SheetPoint(1.1, 1.1)
Dim Face1 = VIEW1.GetIntent("Face1", nearPoint := Point1)
Dim Face2 = VIEW1.GetIntent("Face2")
Dim Face3 = VIEW1.GetIntent("Face3")
Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions
Dim filletDim1 = genDims.AddRadius("Fillet Radius1", Point1, Face1)
Dim filletDim2 = genDims.AddRadius("Fillet Radius2", Point2, Face2)
Dim filletDim3 = genDims.AddRadius("Fillet Radius3", Point3, Face3)
@MjDeck and @Curtis_Waguespack, thank you so much for the time you dedicated to responding. It worked perfectly here as well.
Can't find what you're looking for? Ask the community or share your knowledge.