Here is how it can be done. I have created sketch with line and sketch tekst to be extruded as a mark. You can link sketch text to sketch dimension by typing dimension name in sketch text properties. As you see on screenshot the text is linked to height of sketch.
Then i just make an extrusion of the sketch.
Second part is to use variable pattern. Here you can use excel table to drive the height.
As the text is linked to the height dim it shoulod update with the pattern.
SW 2017 part attached.
measure bar.SLDPRT.zip 405.7 KB
Hi Krzysztof, Thanks for the tips. The problem with mine, is that the numbers doesn't need to be applied on every line ,after 1000 Liter mark ,we place it on every 1000 L mark and after we get to certain height we then will apply again on every mark in 200 increments. The volume number marking on the stick is not the actual height of the line. instead showing the volume of liquid is in the containment area.
Is there anyway possible for me to place markings at certain heights with a set sketch text. anyone with any ideas will be much appreciated, thank you soo much
V MEASURING BAR TABLE.zip 683.5 KB
Look at this (file attached)
I have divided marking line and text into two separate operations and used two patterns. One for line, second for text.
In the marking text sketch i have used "dummy" line with dim to drive the text value.
measure bar.SLDPRT.zip 324.2 KB
Thank you soo much!! Saved me a lot of time, manually imputing the text in
Try this, however I couldn't get the text to constrain to the line.
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim Linie() As SldWorks.SketchLine
Dim nText As SldWorks.SketchText
Dim swSelData As SldWorks.selectdata
Dim boolstatus As Boolean
Dim swSelMgr As SldWorks.SelectionMgr
Dim swSketchMgr As SldWorks.SketchManager
Dim swsketchseg As SldWorks.SketchSegment
Dim selectdata As SldWorks.selectdata
Dim SketchLineID As Variant
Dim linename, no As String
Dim i As Integer
Dim Max As Integer
Max = 10
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set swext = Part.Extension
Set swSelMgr = Part.SelectionManager
Set swSketchMgr = Part.SketchManager
If Part.IGetActiveSketch2 Is Nothing Then
MsgBox "You must be in sketch edit mode for this macro to work!" & Chr(13) & Chr(13) & "Edit a sketch a then try again."
' swSketchMgr.InsertSketch (True)
For i = 1 To Max
X1Pos = (280 - i * 10) / 1000
X2Pos = (270 - i * 10) / 1000
Y1Pos = (80) / 1000
Y2Pos = (80) / 1000
Set Linie(i) = Part.CreateLine2(X1Pos, Y1Pos, 0, X2Pos, Y2Pos, 0)
Linie(i).ConstructionGeometry = True
Set swsketchseg = swSelMgr.GetSelectedObject6(1, -1)
Set swSelData = swSelMgr.CreateSelectData
boolstatus = Linie(i).Select4(False, swSelData)
no = CStr(i)
Set nText = Part.InsertSketchText((X1Pos + X2Pos) / 2, Y1Pos, 0, no, 0, 0, 0, 100, 100)
For i = 1 To Max
If i = 1 Then boolstatus = False Else boolstatus = True
boolstatus = Linie(i).Select4(boolstatus, swSelData)