Still working on my pricing macro and getting stuck on how to position the price group to where I want it.I'm trying to get it to the blank area but not sure the best way to go about it.
Private Sub Make_Click() Dim Dlr As Shape Dim Cnt As Shape Dim Sym As Shape Dim Tax As Shape Dim Pk As Shape Dim Price As Shape Dim TextType As String Dim X As Double, Y As Double, w As Double, h As Double Const space_dist As Double = 0.1 Dim sr As New ShapeRange Set Dlr = ActiveLayer.CreateArtisticText(0, 0, PriceFrm.Dollar.Value, , , BrandFont.Value, 100) Set Cnt = ActiveLayer.CreateArtisticText(0, 0, PriceFrm.Cents.Value, , , BrandFont.Value, 50) Set Sym = ActiveLayer.CreateArtisticText(0, 0, "$", , , BrandFont.Value, 50) Set Tax = ActiveLayer.CreateArtisticText(0, 0, PriceFrm.Tax_Options.Value, , , BrandFont.Value, 9, , , , cdrCenterAlignment) 'Cent Position Cnt.AlignToShape cdrAlignTop, Dlr Cnt.LeftX = Dlr.RightX + space_dist '$ Position Sym.AlignToShape cdrAlignTop, Dlr Sym.RightX = Dlr.LeftX - 0.07 'Tax Position Cnt.GetBoundingBox X, Y, w, h Tax.SetSize w Tax.AlignToShape cdrAlignHCenter, Cnt Tax.TopY = Cnt.BottomY - 0.07 'Select & Group Price sr.Add Dlr sr.Add Cnt sr.Add Sym sr.Add Tax sr.Group.Name = "$" & PriceFrm.Dollar.Value & "." & PriceFrm.Cents.Value sr.GetBoundingBox X, Y, w, h 'Add Package If Pk_MultiPage.Value = 0 Then 'Standard Set Pk = ActiveLayer.CreateArtisticText(0, 0, Pk_Options_Std.Value, , , BrandFont.Value, 9, , , , cdrCenterAlignment) Pk.SetSize w Pk.CenterX = sr.Group.CenterX Pk.TopY = sr.Group.BottomY - 0.1 Pk.Name = Pk_Options_Std.Value Else If Pk_MultiPage.Value = 1 Then 'Stacked Set Pk = ActiveLayer.CreateArtisticText(0, 0, Pk_Options_Stk.Value, , , BrandFont.Value, 9, , , , cdrCenterAlignment) Pk.SetSize w Pk.CenterX = sr.Group.CenterX Pk.TopY = sr.Group.BottomY - 0.1 Pk.Text.Story.LineSpacing = 73.638 Pk.Name = Pk_Options_Stk.Value Else If Pk_MultiPage.Value = 2 Then 'Narrow Set Pk = ActiveLayer.CreateArtisticText(0, 0, Pk_Options_Nw.Value, , , BrandFont.Value, 9, , , , cdrCenterAlignment) Pk.Text.Story.LineSpacing = 73.638 Pk.SetSize , Dlr.SizeHeight Pk.LeftX = sr.Group.RightX + 0.15 Pk.CenterY = sr.Group.CenterY Pk.Name = Pk_Options_Nw.Value End If End If End If 'Group and Rename ActiveLayer.Shapes(2).AddToSelection ActiveSelection.Group.Name = "$" & PriceFrm.Dollar.Value & "." & PriceFrm.Cents.Value 'Text Brand Colors If BrandFont.Value = "Bud Bold" Then ActiveSelection.Fill.UniformColor.CMYKAssign 75, 68, 65, 90 Else If BrandFont.Value = "TitlingGothicFB Comp Medium" Then ActiveSelection.Fill.UniformColor.CMYKAssign 75, 35, 0, 0 Else If BrandFont.Value = "Gotham Bold" Then ActiveSelection.Fill.UniformColor.CMYKAssign 100, 87, 0, 20 Else If BrandFont.Value = "Trade Gothic LT Std Bold" Then ActiveSelection.Fill.UniformColor.CMYKAssign 100, 96, 26, 21 Else If BrandFont.Value = "TradeGothic" Then ActiveSelection.Fill.UniformColor.CMYKAssign 75, 68, 65, 90 Else If BrandFont.Value = "Futura Md BT" Then ActiveSelection.Fill.UniformColor.CMYKAssign 75, 68, 65, 90 End If End If End If End If End If End If End Sub
Your video is showing as "private".
Oops forgot to finish uploading. It should be good to go now. https://youtu.be/DcAxiGZDycE
I don't know what the best way is for you to accomplish what you want here.
For some of the stuff with which I work, I find it useful to have some "reference content" - e.g., rectangles and lines - on a non-printing layer. I can use those objects as references when aligning or snapping the printable content.
If you named such a reference object, you could "find it by name" in your VBA code, and then use that to position and/or resize the pricing content you are creating.
Hi Jamie!
I think I can write such macro you need. I have several questions about the task. But I prefer communication via e-mail. If you are really interested, write to me at tv.softlv@gmail.com please.Taras
Yeah, that's the solution I ended up taking. Making a rectangle for the remaining blank space and using it as a reference for aligning the pricing.