Author Topic: Snap From Endpoint  (Read 9659 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Snap From Endpoint
« Reply #45 on: October 21, 2005, 10:58:32 AM »
Tracey,

Do you want Text or Mtext in your details ?

If Mtext, do you want the  monotxt.shx override maintained.
If Mtext, do you want the  0.75 TextWidth override maintained.

Style for 0.4 Text   [ and/or Mtext ]
Style for 0.2 Text   [ and/or Mtext ]  Note it is 1.8 H is some design dwgs 2.0 in others ?

Do you want the labels converted to uppercase ?

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Snap From Endpoint
« Reply #46 on: October 21, 2005, 11:25:58 AM »
OK you two.....get a ROOM or something! Sheeeesh!

Your meaning eludes me. ?

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
Re: Snap From Endpoint
« Reply #47 on: October 21, 2005, 11:39:02 AM »
Poor Mr Bear, did you want to join in the fun!


Kerry, the font should print out as the client standard, which would be either Romand or arial depending on the client, and the height should be 2. The labels, uppercase would be nice, but not essential!

Many thanks
T :-)
Thanks for explaining the word "many" to me, it means a lot.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Snap From Endpoint
« Reply #48 on: October 21, 2005, 07:16:28 PM »
This is worse that pulling teeth ..  :?

Unless you say otherwise :

Text will be used .. Mtext will be converted.
Style will be "oxford standard" [ currently defined using romand.shx ]
Width scale factor  will be changed from 0.75 to 1.0
0.18 High Text will be changed to 0.2  High and the insert point moved Y -0.2
Table label Text will be changed to uppercase.

Can you resolve these. .. may need to email the .shx files
Quote
Substituting [isocp.shx] for [Babtie].
Substituting [isocp.shx] for [Mark 1].

mapping.shx required
civil.shx required
« Last Edit: October 21, 2005, 07:34:14 PM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
Re: Snap From Endpoint
« Reply #49 on: October 24, 2005, 03:14:21 AM »
Kerry, sorry about the delay. (I thought I'd e-mailed you the details)
The Babtie and Mark 1, I dont know why they are in there! It may be something to do with the translation from MX.

I will e-mail the mapping and civil shx files to your e-mail address.

Many thanks for your time

Tracey
Thanks for explaining the word "many" to me, it means a lot.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Snap From Endpoint
« Reply #50 on: October 24, 2005, 05:09:22 AM »
Got them Tracey.

I'll have another look after I have dinner.

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Snap From Endpoint
« Reply #51 on: October 24, 2005, 05:41:44 AM »
Tracey,
You'll need to explode the "ACAD_PROXY_ENTITY" then explode the "MTEXT"

I used QSELECT quite sucessfully, selecting a column at a time. you should be left with LWPOLYLINE and TEXT only.

Insert the exploded design sections into your Template drawing.

Convert using TJ880.

Relocate using TJ990.

Code: [Select]
(prompt
  "\n SuperDuper SectionTable modifier for Jonesy.[build 2.0]\n Type TJ880 at the commandLine to start"
)

(defun c:TJ880 (/
                ;; Functions
                ProcessPoly     ProcessText    sset->vlalist
                ;; Variables
                TextStyle      LayerExisting   LayerText
                LayerFrame      oName           TJ-KAHUNA
               )
  (setq TextStyle    "oxford standard"
        LayerExisting "C-LEVL-EXTG"
        LayerProposed "C-LEVL-PROP"
        LayerText     "C-LEVL-TEXT"
        LayerFrame    "C-LEVL-FRAM"
  )
  ;;
  ;; KWB @ The Swamp 20051024
  ;;
  ;; ----------------------
  (defun ProcessText (oText / oTextTrueColor oTextString)

    ;;
    (if (equal 0.18 (vla-get-height oText) 0.005)
      (vla-put-height oText 0.20)
    )
    ;;
    (if (equal (/ pi 2) (vla-get-rotation oText) 0.0005)
      (vla-put-insertionpoint
        oText
        (vlax-3d-point
          (mapcar '-
                  (vlax-safearray->list
                    (vlax-variant-value (vla-get-insertionpoint oText))
                  )
                  '(0.0 0.2 0.0)
          )
        )
      )
    )
   
    ;;
    (vla-put-textstring oText (strcase (vla-get-textstring oText)))

    ;;
    (setq oTextTrueColor (vla-get-colorindex (vla-get-truecolor oText))
          oTextString    (vla-get-textstring oText)
    )
   
    ;;
    (cond ((vl-string-search "LEVEL DATUM" oTextString)
           (vla-put-layer oText LayerText)
          )
          ;;
          ((vl-string-search "CHAINAGE" oTextString)
           (vla-put-layer oText LayerText)
          )
          ;;         
          ((= oTextTrueColor acred) (vla-put-layer oText LayerProposed))
          ((= oTextTrueColor acgreen) (vla-put-layer oText LayerExisting))
    )
    (vla-put-stylename oText TextStyle)   
    (vla-put-ScaleFactor oText 1.0)
    (vla-put-color oText acbylayer)
   
    (princ)
  )
  ;; ----------------------
  (defun ProcessPoly (oPoly / oPolyLength oPolyTrueColor)
    (setq oPolyTrueColor (vla-get-colorindex (vla-get-truecolor oPoly))
          oPolyLength    (vla-get-length oPoly)
    )
    (cond ((= oPolyTrueColor acred)
           (vla-put-layer oPoly LayerProposed)
           (vla-put-color oPoly acbylayer)
           ;; To Do :
           ;; add the incline Text
           ;;
          )
          ((= oPolyTrueColor acgreen)
           (vla-put-layer oPoly LayerExisting)
           (vla-put-color oPoly acbylayer)
          )
          ((or (> oPolyLength 15) (equal oPolyLength 0.100 0.01))
           ;; rectangles or markers ..
           (vla-put-layer oPoly LayerFrame)
           (vla-put-color oPoly acbylayer)
          )
          (t
           (vla-put-layer oPoly LayerProposed)
           (vla-put-color oPoly acbylayer)
          )
    )
  )
  ;; ----------------------
  ;; ----------------------
  (defun sset->vlalist (sset / index ReturnValue)
    (setq index (if sset
                  (1- (sslength sset))
                  -1
                )
    )
    (while (>= index 0)
      (setq ReturnValue (cons (vlax-ename->vla-object (ssname sset index))
                              ReturnValue
                        )
            index       (1- index)
      )
    )
    ReturnValue
  )
  ;;
  ;; Main ------------------
  ;;
  ;; Make a selection of the Tables .. saved in TJ-kahuna
  ;;
  (prompt "\n Select Frames to modify.")
  (setq TJ-kahuna (sset->vlalist (ssget)))
  ;;
  ;; Do the mojo
  ;;
  (foreach item TJ-kahuna
    ;; (setq tmp item)
    (cond ((= (vla-get-objectname item) "AcDbPolyline") (ProcessPoly item))
          ((= (vla-get-objectname item) "AcDbText") (ProcessText item))
    )
  ) 
  (princ)
)
(princ)
« Last Edit: October 24, 2005, 06:11:09 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
Re: Snap From Endpoint
« Reply #52 on: October 24, 2005, 06:06:51 AM »
WOW

Thank you very much Kerry, it works great, and will save mucho time = more swamp time.


Many thanks

Tracey
Thanks for explaining the word "many" to me, it means a lot.

t-bear

  • Guest
Re: Snap From Endpoint
« Reply #53 on: October 24, 2005, 09:24:59 AM »
Good looking bit of coding there Kerry!  I especially like the commenting......
"Do the Mojo"?  :-o
"TJ-kahuna"??  :roll:
Sweeeet!! :-D :-D

Have fun there, "TJ"............................

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
Re: Snap From Endpoint
« Reply #54 on: October 24, 2005, 09:27:38 AM »
Thanks T-Bear, now I CAN have some fun instead of pulling my hair out every time there is a design change!
Thanks for explaining the word "many" to me, it means a lot.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Snap From Endpoint
« Reply #55 on: October 24, 2005, 04:10:23 PM »
....... I especially like the commenting......

It's probably just as well most of my code isn't public, some of it DOES have frivolous comments.

Yep, that was fun Ted. No need for pages of assertion testing and error testing.

.. and knowing how much time it would save Tracey was icing on the cake, so to speak.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
Re: Snap From Endpoint
« Reply #56 on: October 25, 2005, 03:35:53 AM »
Glad you enjoyed yourself Kerry!

Thanks again for the files. Cant wait to start using it in on the next scheme.

Catch you later

T :-)
Thanks for explaining the word "many" to me, it means a lot.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
Re: Snap From Endpoint
« Reply #57 on: November 01, 2005, 05:51:57 AM »
Kerry,


THANK YOU, THANK YOU, THANK YOU!

I have just used your routines (the design changed yet again on the 44 drawing sheet scheme I originally whined here about.

Start to finish (with a bit of "talking time") it took around about 1 hour, instead of the nearly 30 hours the first batch took.

Once again, thanks for your help

Tracey :-)
Thanks for explaining the word "many" to me, it means a lot.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Snap From Endpoint
« Reply #58 on: November 01, 2005, 06:33:17 PM »
<SatisfiedSigh.wav>
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Snap From Endpoint
« Reply #59 on: November 01, 2005, 06:39:54 PM »
Well done Kerry. I had offered to help our fair friend, but you beat me to it, so I begged off, knowing you'd write an outstanding solution.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst