Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Drawing Problem

Hi all,

I have a program that draw plans and elevations for sheds however it doesn't
always draw it correctly, it puts in gaps sometimes while other times it
seems to draw it correctly. The code below is to do a series of bay centers
dimension lines along the side of the shed, if someone can help me out there
that will be great.

buildlength = Sheets("Bay Calculator").Cells(2, 2) + Sheets("Variable
Properties").Cells(27, 2) + Sheets("Variable Properties").Cells(27, 4)
buildwidth = Sheets("Variable Properties").Cells(11, 2).Value +
Sheets("Variable Properties").Cells(22, 2).Value + Sheets("Variable
Properties").Cells(22, 4).Value

hfpScaling = (buildlength / Sheet19.Shapes("Rectangle 258").Width)
vfpScaling = (buildwidth / Sheet19.Shapes("Rectangle 258").Height)

If hfpScaling vfpScaling Then
scalingend = (hfpScaling * 1.7)
Else
scalingend = (vfpScaling * 1.7)
End If

buildwidth1 = (buildwidth / scalingend)
buildlength1 = (buildlength / scalingend)

Length = buildlength / scalingend
wallht = Sheets("Variable Properties").Range("b12") / scalingend
walllgth = Sheets("Bay Calculator").Cells(2, 2) / scalingend
rise = Sheets("Accessories Calculations").Range("e2") / scalingend
totalheight = buildwidth1
rfsheetcover = Sheets("Accessories Calculations").Range("b3") / scalingend
span = (Sheets("Variable Properties").Range("b11") / scalingend)
totalwidth = (Sheets("Variable Properties").Cells(11, 2) + Sheets("Variable
Properties").Cells(22, 2) + Sheets("Variable Properties").Cells(22, 4))
apex = (Sheets("Accessories Calculations").Cells(168, 5) / scalingend)
skillionlgth = (Sheets("variable properties").Cells(24, 2) / scalingend)
sktoproofht = (Sheets("variable properties").Cells(21, 6) / scalingend)
skbotroofht = (Sheets("variable properties").Cells(22, 6) / scalingend)
skillionextensiontop = (Sheets("variable properties").Cells(22, 2) /
scalingend)
skillionextensionbot = (Sheets("variable properties").Cells(22, 4) /
scalingend)
leftgable = (Sheets("variable properties").Cells(27, 2) / scalingend)
rightgable = (Sheets("variable properties").Cells(27, 4) / scalingend)
baycrs = (Sheets("Bay Calculator").Cells(2, 2) / Sheets("variable
properties").Cells(14, 2) / scalingend)


Sheet19.Activate

With ActiveSheet.Shapes("Rectangle 258")
floorplantop = .Top
floorplanleft = .Left
floorplanright = .Left + .Width
floorplanbottom = .Top + .Height
floorplanlengthgap = (.Width - Length) / 2
floorplanheightgap = (.Height - buildwidth1) / 2
End With
'-------------------------------------------------------------------------------------------------------------------
'''''''''''''''''DIMENSIONING''''''''''''''''''''' ''''''
'------------------------------------------------------------------------------------------------------------------
Gap = 0
Gap1 = 0
If (((floorplanheightgap / 4) / 4)) (((floorplanlengthgap / 4) / 4)) Then
Textheight = (((floorplanlengthgap / 4) / 4))
Gap1 = (((floorplanheightgap / 4) / 4)) - (((floorplanlengthgap / 4) / 4))
Else
Textheight = (((floorplanheightgap / 4) / 4))
Gap = (((floorplanlengthgap / 4) / 4)) - (((floorplanheightgap / 4) / 4))
End If
'================================================= ================================================== =============================================

'--- Bay Dimensions ---

'================================================= ================================================== =============================================

'--- Top Dimensions ---

X = 4
Do Until X = 14
If Sheets("Bay Calculator").Cells(X, 2).Value = 0 Then
Exit Do
Else
ActiveSheet.Shapes("dimline").Select
Selection.Copy
ActiveSheet.Paste
Selection.Name = "dim"
Selection.ShapeRange.Top = floorplantop + ((floorplanheightgap / 4) * 2) -
(((floorplanheightgap / 4) / 4) * 3)
Selection.ShapeRange.Height = 0#
Selection.ShapeRange.Width = (Sheets("Bay Calculator").Cells(X, 2).Value /
scalingend)
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = floorplanleft + leftgable + floorplanlengthgap +
(Sheets("Bay Calculator").Cells(X, 3).Value / scalingend)
Selection.ShapeRange.ZOrder msoSendFront
ActiveSheet.Shapes("dimline").Select
Selection.Copy
ActiveSheet.Paste
Selection.Name = "dim"
Selection.ShapeRange.Top = floorplantop + ((floorplanheightgap / 4) * 2) -
(((floorplanheightgap / 4) / 4) * 3) - 2
Selection.ShapeRange.Height = 4
Selection.ShapeRange.Width = 4
Selection.ShapeRange.Rotation = 90
Selection.ShapeRange.Left = floorplanleft + leftgable + floorplanlengthgap +
(Sheets("Bay Calculator").Cells(X, 3).Value / scalingend) - 2
Selection.ShapeRange.ZOrder msoSendFront
ActiveSheet.Shapes("dimline").Select
Selection.Copy
ActiveSheet.Paste
Selection.Name = "dim"
Selection.ShapeRange.Top = floorplantop + ((floorplanheightgap / 4) * 2) -
(((floorplanheightgap / 4) / 4) * 3) - 2
Selection.ShapeRange.Height = 4
Selection.ShapeRange.Width = 4
Selection.ShapeRange.Rotation = 90
Selection.ShapeRange.Left = floorplanleft + leftgable + floorplanlengthgap +
(Sheets("Bay Calculator").Cells(X, 3).Value / scalingend) + (Sheets("Bay
Calculator").Cells(X, 2).Value / scalingend) - 2
Selection.ShapeRange.ZOrder msoSendFront
ActiveSheet.Shapes("ExtLine").Select
Selection.Copy
ActiveSheet.Paste
Selection.Name = "dim"
Selection.ShapeRange.Top = floorplantop + ((floorplanheightgap / 4) * 2) -
(((floorplanheightgap / 4) / 4) * 4)
Selection.ShapeRange.Height = (((floorplanheightgap / 4) / 4) * 3)
Selection.ShapeRange.Width = 0#
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = floorplanleft + leftgable + floorplanlengthgap +
(Sheets("Bay Calculator").Cells(X, 3).Value / scalingend)
Selection.ShapeRange.ZOrder msoSendFront
ActiveSheet.Shapes("ExtLine").Select
Selection.Copy
ActiveSheet.Paste
Selection.Name = "dim"
Selection.ShapeRange.Top = floorplantop + ((floorplanheightgap / 4) * 2) -
(((floorplanheightgap / 4) / 4) * 4)
Selection.ShapeRange.Height = (((floorplanheightgap / 4) / 4) * 3)
Selection.ShapeRange.Width = 0#
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = floorplanleft + leftgable + floorplanlengthgap +
((Sheets("Bay Calculator").Cells(X, 3).Value + Sheets("Bay
Calculator").Cells(X, 2).Value) / scalingend)
Selection.ShapeRange.ZOrder msoSendFront
If Sheets("Bay Calculator").Cells(X, 2).Value < 999 Then
ActiveSheet.Shapes("DimText").Select
Selection.Copy
ActiveSheet.Paste
Selection.Name = "dim"
Selection.ShapeRange.Top = floorplantop + ((floorplanheightgap / 4) * 2) -
(((floorplanheightgap / 4) / 4) * 4) - 2
Selection.ShapeRange.Height = Textheight
Selection.ShapeRange.Width = 11.25
Selection.ShapeRange.Left = floorplanleft + leftgable + floorplanlengthgap +
(Sheets("Bay Calculator").Cells(X, 3).Value / scalingend) + ((Sheets("Bay
Calculator").Cells(X, 2).Value / scalingend) / 2) - 5.625
Selection.ShapeRange.TextEffect.Text = Sheets("Bay Calculator").Cells(X,
2).Value
Else
ActiveSheet.Shapes("DimText").Select
Selection.Copy
ActiveSheet.Paste
Selection.Name = "dim"
Selection.ShapeRange.Top = floorplantop + ((floorplanheightgap / 4) * 2) -
(((floorplanheightgap / 4) / 4) * 4) - 2
Selection.ShapeRange.Height = Textheight
Selection.ShapeRange.Width = 15
Selection.ShapeRange.Left = floorplanleft + leftgable + floorplanlengthgap +
(Sheets("Bay Calculator").Cells(X, 3).Value / scalingend) + ((Sheets("Bay
Calculator").Cells(X, 2).Value / scalingend) / 2) - 7.5
Selection.ShapeRange.TextEffect.Text = Sheets("Bay Calculator").Cells(X,
2).Value
End If
End If
X = X + 1
Loop
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in Drawing Lines (AutoShapes) Jac Excel Discussion (Misc queries) 0 October 8th 06 08:45 AM
Problem in Drawing Lines (AutoShapes) Jac Excel Discussion (Misc queries) 0 October 8th 06 08:37 AM
Drawing Objects with duplicate names problem Peter T Excel Programming 2 June 21st 05 03:07 PM
Problem drawing lines on charts Susan Lambert Charts and Charting in Excel 7 December 13th 04 08:29 AM
Problem with drawing graphs vidhya Excel Programming 1 October 31st 03 05:00 AM


All times are GMT +1. The time now is 11:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"