Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have this rule, which it works almost fine, maybe somebody can help me to make it work good.
-We use the inventor auto naming/numbering
-If I use whatever iProperties which is contain the part name whic is "00303076" in the sketch it is not appear the leading zeros. only "303076" . Can this be fixed?
And can the sketch somehow be position on the mouse pointer position?
This is my rule....
Dim pick = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFacePlanarFilter, "Select face") Dim face As Face = pick Dim faceBox = face.Evaluator.RangeBox Dim x As Double = faceBox.MaxPoint.X - faceBox.MinPoint.X x = ThisDoc.FileName(False) Dim partDef As PartComponentDefinition = face.Parent.Parent Dim planarSketch = partDef.Sketches.Add(face) 'Projected center of mass Dim position As Point2d = planarSketch.ModelToSketchSpace(partDef.MassProperties.CenterOfMass) planarSketch.TextBoxes.AddFitted(position, String.Format("{0}", x)) planarSketch.Name = "My_Sketch"
Many Thanks!
Solved! Go to Solution.