Threaded Callout spacing

To All, Request you to help me how to avoid space between callout members. Ex: 1/2-36 UNC -2B, after adding text below the callout, there the spaces are automatically created. Please help how to resolve this problem.

Also how to make all the callout members to become as one single sentence, means should behave as note and as usual it should be parametric.

Are you using NXOpen to create and place the callout? If so, please reply with your NX version and the code you have so far.

If you are creating the callout with the interactive NX commands, you will be better served by posting your question to a general NX usage forum such as:
http://www.eng-tips.com/threadminder.cfm?pid=561
or
http://community.plm.automation.siemens.com/t5/NX-Design-Discussion-Foru...
If/when you post a question to one of those sites, please also list your NX version and what drafting standard you are using.

Thank you for the reply. I am using NX7.5 version. I don't have code. Request to support in this regard.

Please find below code to create new horizontal dimension in the drawing. I need the below code to be edited to create new dimension for threaded hole.I am not successfull on this , kindly help me. Finally thread callout should look like "1/2-13 UNC-2B THRU"



Please find below the code to crate parametric horizontal dimesion.




Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work

Dim displayPart As Part = theSession.Parts.Display

Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Start")

theSession.SetUndoMarkVisibility(markId1, Nothing, Session.MarkVisibility.Invisible)

theSession.SetUndoMarkName(markId1, "Dimensions Dialog")

Dim markId2 As Session.UndoMarkId
markId2 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Create Dimension")

Dim dimensionData1 As Annotations.DimensionData
dimensionData1 = workPart.Annotations.NewDimensionData()

Dim associativity1 As Annotations.Associativity
associativity1 = workPart.Annotations.NewAssociativity()

Dim block1 As Features.Block = CType(workPart.Features.FindObject("BLOCK(46)"), Features.Block)

Dim edge1 As Edge = CType(block1.FindObject("EDGE * 1 * 2 {(21,19,0.5)(20,19,0.5)(19,19,0.5) CYLINDER(4)}"), Edge)

associativity1.FirstObject = edge1

Dim nullNXObject As NXObject = Nothing

associativity1.SecondObject = nullNXObject

Dim baseView1 As Drawings.BaseView = CType(workPart.DraftingViews.FindObject("TOP@11"), Drawings.BaseView)

associativity1.ObjectView = baseView1

associativity1.PointOption = Annotations.AssociativityPointOption.Control

associativity1.LineOption = Annotations.AssociativityLineOption.None

Dim firstDefinitionPoint1 As Point3d = New Point3d(0.0, 0.0, 0.0)
associativity1.FirstDefinitionPoint = firstDefinitionPoint1

Dim secondDefinitionPoint1 As Point3d = New Point3d(0.0, 0.0, 0.0)
associativity1.SecondDefinitionPoint = secondDefinitionPoint1

associativity1.Angle = 0.0

Dim pickPoint1 As Point3d = New Point3d(21.0, 19.0, 0.5)
associativity1.PickPoint = pickPoint1

Dim associativity2(0) As Annotations.Associativity
associativity2(0) = associativity1
dimensionData1.SetAssociativity(1, associativity2)

associativity1.Dispose()
Dim associativity3 As Annotations.Associativity
associativity3 = workPart.Annotations.NewAssociativity()

associativity3.FirstObject = edge1

associativity3.SecondObject = nullNXObject

associativity3.ObjectView = baseView1

associativity3.PointOption = Annotations.AssociativityPointOption.Control

associativity3.LineOption = Annotations.AssociativityLineOption.None

Dim firstDefinitionPoint2 As Point3d = New Point3d(0.0, 0.0, 0.0)
associativity3.FirstDefinitionPoint = firstDefinitionPoint2

Dim secondDefinitionPoint2 As Point3d = New Point3d(0.0, 0.0, 0.0)
associativity3.SecondDefinitionPoint = secondDefinitionPoint2

associativity3.Angle = 0.0

Dim pickPoint2 As Point3d = New Point3d(19.0, 19.0, 0.5)
associativity3.PickPoint = pickPoint2

Dim associativity4(0) As Annotations.Associativity
associativity4(0) = associativity3
dimensionData1.SetAssociativity(2, associativity4)

associativity3.Dispose()
Dim dimensionPreferences1 As Annotations.DimensionPreferences
dimensionPreferences1 = workPart.Annotations.Preferences.GetDimensionPreferences()

Dim ordinateDimensionPreferences1 As Annotations.OrdinateDimensionPreferences
ordinateDimensionPreferences1 = dimensionPreferences1.GetOrdinateDimensionPreferences()

ordinateDimensionPreferences1.Dispose()
Dim chamferDimensionPreferences1 As Annotations.ChamferDimensionPreferences
chamferDimensionPreferences1 = dimensionPreferences1.GetChamferDimensionPreferences()

chamferDimensionPreferences1.Dispose()
Dim narrowDimensionPreferences1 As Annotations.NarrowDimensionPreferences
narrowDimensionPreferences1 = dimensionPreferences1.GetNarrowDimensionPreferences()

narrowDimensionPreferences1.DimensionDisplayOption = Annotations.NarrowDisplayOption.None

dimensionPreferences1.SetNarrowDimensionPreferences(narrowDimensionPreferences1)

narrowDimensionPreferences1.Dispose()
Dim unitsFormatPreferences1 As Annotations.UnitsFormatPreferences
unitsFormatPreferences1 = dimensionPreferences1.GetUnitsFormatPreferences()

unitsFormatPreferences1.Dispose()
Dim diameterRadiusPreferences1 As Annotations.DiameterRadiusPreferences
diameterRadiusPreferences1 = dimensionPreferences1.GetDiameterRadiusPreferences()

diameterRadiusPreferences1.Dispose()
dimensionData1.SetDimensionPreferences(dimensionPreferences1)

dimensionPreferences1.Dispose()
Dim lineAndArrowPreferences1 As Annotations.LineAndArrowPreferences
lineAndArrowPreferences1 = workPart.Annotations.Preferences.GetLineAndArrowPreferences()

dimensionData1.SetLineAndArrowPreferences(lineAndArrowPreferences1)

lineAndArrowPreferences1.Dispose()
Dim letteringPreferences1 As Annotations.LetteringPreferences
letteringPreferences1 = workPart.Annotations.Preferences.GetLetteringPreferences()

dimensionData1.SetLetteringPreferences(letteringPreferences1)

letteringPreferences1.Dispose()
Dim userSymbolPreferences1 As Annotations.UserSymbolPreferences
userSymbolPreferences1 = workPart.Annotations.NewUserSymbolPreferences(Annotations.UserSymbolPreferences.SizeType.ScaleAspectRatio, 1.0, 1.0)

dimensionData1.SetUserSymbolPreferences(userSymbolPreferences1)

userSymbolPreferences1.Dispose()
Dim linearTolerance1 As Annotations.LinearTolerance
linearTolerance1 = workPart.Annotations.Preferences.GetLinearTolerances()

dimensionData1.SetLinearTolerance(linearTolerance1)

linearTolerance1.Dispose()
Dim angularTolerance1 As Annotations.AngularTolerance
angularTolerance1 = workPart.Annotations.Preferences.GetAngularTolerances()

angularTolerance1.DimensionDecimalPlaces = 3

Dim lowerToleranceDegrees1 As Annotations.Value
lowerToleranceDegrees1.ItemValue = -0.005
Dim nullExpression As Expression = Nothing

lowerToleranceDegrees1.ValueExpression = nullExpression
lowerToleranceDegrees1.ValuePrecision = 3
angularTolerance1.SetLowerToleranceDegrees(lowerToleranceDegrees1)

Dim upperToleranceDegrees1 As Annotations.Value
upperToleranceDegrees1.ItemValue = 0.005
upperToleranceDegrees1.ValueExpression = nullExpression
upperToleranceDegrees1.ValuePrecision = 3
angularTolerance1.SetUpperToleranceDegrees(upperToleranceDegrees1)

dimensionData1.SetAngularTolerance(angularTolerance1)

angularTolerance1.Dispose()
Dim appendedText1 As Annotations.AppendedText
appendedText1 = workPart.Annotations.NewAppendedText()

Dim lines1(-1) As String
appendedText1.SetAboveText(lines1)

Dim lines2(-1) As String
appendedText1.SetAfterText(lines2)

Dim lines3(-1) As String
appendedText1.SetBeforeText(lines3)

Dim lines4(-1) As String
appendedText1.SetBelowText(lines4)

dimensionData1.SetAppendedText(appendedText1)

appendedText1.Dispose()
Dim xform1 As Xform
xform1 = dimensionData1.GetInferredPlane(Annotations.PmiDefaultPlane.XyOfWcs, Annotations.DimensionType.Baseline)

Dim origin1 As Point3d = New Point3d(-1.77635683940025e-015, 0.0, 0.0)
Dim horizontalDimension1 As Annotations.HorizontalDimension
horizontalDimension1 = workPart.Dimensions.CreateHorizontalDimension(dimensionData1, origin1)

dimensionData1.Dispose()
Dim nErrs1 As Integer
nErrs1 = theSession.UpdateManager.DoUpdate(markId2)

horizontalDimension1.IsOriginCentered = True

Dim origin2 As Point3d = New Point3d(10.7780014800422, 10.3080138803444, 0.0)
horizontalDimension1.AnnotationOrigin = origin2

horizontalDimension1.LeaderOrientation = Annotations.LeaderOrientation.FromLeft

Dim nErrs2 As Integer
nErrs2 = theSession.UpdateManager.DoUpdate(markId2)

theSession.SetUndoMarkVisibility(markId1, Nothing, Session.MarkVisibility.Visible)

theSession.DeleteUndoMark(markId1, Nothing)

End Sub
End Module