Author Topic: I need help modifying an existing routine  (Read 2269 times)

0 Members and 1 Guest are viewing this topic.

Bryco

  • Water Moccasin
  • Posts: 1850
Re: I need help modifying an existing routine
« Reply #15 on: December 26, 2006, 12:23:06 PM »
Quote
Then use Find to find all the occurences of DrawCLines
and add either "Shade1" or "Shade2" where appropriate.
Dan I ran it and it seems ok

Eloquintet

  • Gator
  • Posts: 3206
Re: I need help modifying an existing routine
« Reply #16 on: December 26, 2006, 12:57:01 PM »
bryco i did do a find and added the same lines you did. one thing i was trying to do was rather than put shade1 for everything like shown below i was numbering them shade1 shade2 shade3 so i can identify which should belong to which assembly as i did with the other lines. i added shade1-9 to be added to the drawing but its not working. could you possible upload yours to the swamp so i can try it out to see if it's something i did?

Code: [Select]
If ThisDrawing.IsSingleShade Then
            If ThisDrawing.IsCS Then  ' center support single shade
                Translate(0) = CLP1(0)
                Translate(1) = CLP1(1)
                Translate(2) = CLP1(2)
                Translate(3) = CLP3(0)
                Translate(4) = CLP3(1)
                Translate(5) = CLP3(2)
               
                DrawCLines Translate, "SHADE1"
               
               
                Translate(0) = CLP2(0)
                Translate(1) = CLP2(1)
                Translate(2) = CLP2(2)
                Translate(3) = CLP3(0)
                Translate(4) = CLP3(1)
                Translate(5) = CLP3(2)
               
                DrawCLines Translate, "SHADE1"
                 
               
               
               
            Else                        ' end condition single shade
                Translate(0) = CLP1(0)
                Translate(1) = CLP1(1)
                Translate(2) = CLP1(2)
                Translate(3) = CLP2(0)
                Translate(4) = CLP2(1)
                Translate(5) = CLP2(2)
               
                DrawCLines Translate, "SHADE1"
                 
           
            End If
   
   Else
            If ThisDrawing.IsCS Then    ' center support double shade
       
                Translate(0) = CLP1(0)
                Translate(1) = CLP1(1)
                Translate(2) = CLP1(2)
                Translate(3) = CLP3(0)
                Translate(4) = CLP3(1)
                Translate(5) = CLP3(2)
               
                DrawCLines Translate, "SHADE1"
               
               
                Translate(0) = CLP2(0)
                Translate(1) = CLP2(1)
                Translate(2) = CLP2(2)
                Translate(3) = CLP3(0)
                Translate(4) = CLP3(1)
                Translate(5) = CLP3(2)
               
                DrawCLines Translate, "SHADE1"
                 
                 
                Translate(0) = CLP4(0)
                Translate(1) = CLP4(1)
                Translate(2) = CLP4(2)
                Translate(3) = CLP6(0)
                Translate(4) = CLP6(1)
                Translate(5) = CLP6(2)
               
                DrawCLines Translate, "SHADE1"
               
               
                Translate(0) = CLP5(0)
                Translate(1) = CLP5(1)
                Translate(2) = CLP5(2)
                Translate(3) = CLP6(0)
                Translate(4) = CLP6(1)
                Translate(5) = CLP6(2)
               
                DrawCLines Translate, "SHADE1"
           
            Else                        '   end condition double shade
           
           
                Translate(0) = CLP1(0)
                Translate(1) = CLP1(1)
                Translate(2) = CLP1(2)
                Translate(3) = CLP2(0)
                Translate(4) = CLP2(1)
                Translate(5) = CLP2(2)
               
                DrawCLines Translate, "SHADE1"
               
                Translate(0) = CLP4(0)
                Translate(1) = CLP4(1)
                Translate(2) = CLP4(2)
                Translate(3) = CLP5(0)
                Translate(4) = CLP5(1)
                Translate(5) = CLP5(2)
               
                DrawCLines Translate, "SHADE1"
Dan

AutoCAD Architecture 2015

Eloquintet

  • Gator
  • Posts: 3206
Re: I need help modifying an existing routine
« Reply #17 on: December 26, 2006, 01:22:29 PM »
bryco disregard my error report it appears something happened to my test drawing that was causing the error. when i try it in a new drawing it works great so far. i will try to sort out what belongs on which layer now. while i'm doing that do you know what i could do about seperating the cyan lines which are created using the hatchtube subroutine i posted. can this be done just like we did the centerlines. This looks like the first instance the subroutine is being used so what do i put there and here to put it on shade1 or shade2 layer? thank you so much you've been a great help.

Code: [Select]
                             If T1 < (ThisDrawing.dblBoRUD / 2) Then
                                HatchTube zZ1, zZ2, T1, (MainAngle - (Pi / 2))
                             Else
                                HatchTube zZ1, zZ2, (ThisDrawing.dblBoRUD / 2), (MainAngle - (Pi / 2))
                             End If


                             If T1 >= ThisDrawing.dblBoRUD Then
                                HatchTube zZ4, zZ5, (ThisDrawing.dblBoRUD / 2), (MainAngle + (Pi / 2))
                             End If




                 



                             If T1 < (ThisDrawing.dblBoRUD / 2) Then
                                HatchTube Z1, Z2, T1, (MainAngle - (Pi / 2))
                             Else
                                HatchTube Z1, Z2, (ThisDrawing.dblBoRUD / 2), (MainAngle - (Pi / 2))
                             End If


                             If T1 >= ThisDrawing.dblBoRUD Then
                                HatchTube Z4, Z5, (ThisDrawing.dblBoRUD / 2), (MainAngle + (Pi / 2))
                             End If





           



                             If T2 < (ThisDrawing.dblSunRUD / 2) Then
                                HatchTube zZ6, zZ7, T2, (MainAngle - (Pi / 2))
                             Else
                                HatchTube zZ6, zZ7, (ThisDrawing.dblSunRUD / 2), (MainAngle - (Pi / 2))
                             End If


                             If T2 >= ThisDrawing.dblSunRUD Then
                                HatchTube zZ9, zZ10, (ThisDrawing.dblSunRUD / 2), (MainAngle + (Pi / 2))
                             End If





             



                             If T2 < (ThisDrawing.dblSunRUD / 2) Then
                                HatchTube Z6, Z7, T2, (MainAngle - (Pi / 2))
                             Else
                                HatchTube Z6, Z7, (ThisDrawing.dblSunRUD / 2), (MainAngle - (Pi / 2))
                             End If


                             If T2 >= ThisDrawing.dblSunRUD Then
                                HatchTube Z9, Z10, (ThisDrawing.dblSunRUD / 2), (MainAngle + (Pi / 2))
                             End If
Dan

AutoCAD Architecture 2015

Eloquintet

  • Gator
  • Posts: 3206
Re: I need help modifying an existing routine
« Reply #18 on: December 26, 2006, 01:53:03 PM »
can i apply the same logic by saying T1.Layer = "SHADE1" as shown below then specify a string in the hatchtube sub

Code: [Select]
                             If T1 < (ThisDrawing.dblBoRUD / 2) Then
                                HatchTube zZ1, zZ2, T1, (MainAngle - (Pi / 2))
                             Else
                                HatchTube zZ1, zZ2, (ThisDrawing.dblBoRUD / 2), (MainAngle - (Pi / 2))
                                T1.Layer = "SHADE1"
                             End If


                             If T1 >= ThisDrawing.dblBoRUD Then
                                HatchTube zZ4, zZ5, (ThisDrawing.dblBoRUD / 2), (MainAngle + (Pi / 2))
                                T1.Layer = "SHADE1"
                             End If
Dan

AutoCAD Architecture 2015

Eloquintet

  • Gator
  • Posts: 3206
Re: I need help modifying an existing routine
« Reply #19 on: December 26, 2006, 01:58:09 PM »
hmmm apparently not im stumped on how to acheive the rest
Dan

AutoCAD Architecture 2015

Bryco

  • Water Moccasin
  • Posts: 1850
Re: I need help modifying an existing routine
« Reply #20 on: December 26, 2006, 09:51:10 PM »
T1 is a double so it cannot be given a layer.
Yes you could change the Hatchtube to also accept a layer argument.
I've looked at the code and it's so all over the shop I think it should be rewritten

Eloquintet

  • Gator
  • Posts: 3206
Re: I need help modifying an existing routine
« Reply #21 on: December 27, 2006, 09:20:12 AM »
unfortunately i don't have the time or knowledge to rewrite the code at this point. Like i said i would eventually like to add grouping to it, insertion of brackets, and notes but not right now. Thanks for your help
Dan

AutoCAD Architecture 2015