Author Topic: A Donation with a Request....  (Read 8103 times)

0 Members and 1 Guest are viewing this topic.

pochrist

  • Guest
A Donation with a Request....
« on: April 22, 2005, 01:12:28 PM »
First where / How can I upload this File to make it Acessable to the Group, it's a vlx so I can't just paste the code.

Here is a Routine that I purchased about 3 years ago, The Author's Shut down his  Website about 2 years ago, as luck would have it I need a modification and of course the file is encrypted.  This one file contains (2) routines: Line UP and Align Text. So here's what I thought, in its current form Its limited to my current needs (I frequently use Rotated Viewports). But very useful if you don't use rotated viewports.
I'm donateing this to the community, and All I ask in return is:

(1) A routine that does what this does, but also works in a rotated Viewport,

(2) Works with Mtext attached to Leaders (Q Leaders) The problem I have with this Routine is it will Line up the Text and Leave the attached Leaders "flapping in the breeze".

The Align Text routine I rarely use so it doesn't need to be included, It's the Line up routine that I love. I have a routine called Tjust, that supposed to do some of what this does, but it also only works in Non rotated Viewports.  

If you can help I'd appreciate it, if not enjoy.
TIA

daron

  • Guest
A Donation with a Request....
« Reply #1 on: April 22, 2005, 01:26:15 PM »
pochrist, I realize that the vlx file is without a findable author, but without the source code and permission from the author, please don't upload it. Thank you for the offer anyway. Now, there is nothing saying that it couldn't be written if you'd like to try your hand. If this is a need for someone or yourself, I'm sure you and/or they will find a way. If you need help, ask. Start with pseuo-code and make it as simple and easily digestable as possible.

The MOD team.

pochrist

  • Guest
A Donation with a Request....
« Reply #2 on: April 22, 2005, 01:58:11 PM »
Not to point out the Obvious, but it is a need for me, and if in the Midst of the mutilple things that fill my time, I had the ability to learn it and write it myself, then requesting help would be a Mute point, wouldn't you agree  :wink:
I thought that uploading the file would serve to;

A) Return the favor.

B) Provide a model (without out uploading it no one would really comprehend Exactly what I need.) "A Picture speaks a 1,000 words...."  :idea:

 As for offending the Author, He obviously is no longer interested in receiving money for his routine, If he was,  then he would still offer to support it - Right  :?:

I didn't request for the Program to be Decompiled, But rather to used as a model and improved. I believe that is a common practise.  :wink:

I believe knowledge and skill are great tools, But the tool isn't only possesed by the One who can make it, Right?
If this was the case Home depot, Lowes & Sears / Craftsman wouldn't be here.

If I have to build a Shed Do I first need to Forge a Hammer and Nails and Hewn the wood? Silly think of.  If i can't Make the tool then I Buy it at the Store or Barter for it. Sorry if this post sounds smug, But I don't pretend to blessed with the Ability and free time that this requires and thought offering a Tool to trade would suffice.

hudster

  • Gator
  • Posts: 2848
A Donation with a Request....
« Reply #3 on: April 22, 2005, 02:07:10 PM »
Quote from: pochrist
As for offending the Author, He obviously is no longer interested in receiving money for his routine, If he was,  then he would still offer to support it


So now that microsoft don't support windows 95 any more, is that alright to pirate it?  I don't think so.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

CADaver

  • Guest
A Donation with a Request....
« Reply #4 on: April 22, 2005, 02:18:49 PM »
Quote from: pochrist
As for offending the Author, He obviously is no longer interested in receiving money for his routine, If he was,  then he would still offer to support it - Right  :?:
Nope, it is still his propietary property, even if he gave it to you for free, it is unethical (maybe illegal) to post it here without his expressed permission.


Quote from: pochrist
I believe knowledge and skill are great tools, But the tool isn't only possesed by the One who can make it, Right?
If this was the case Home depot, Lowes & Sears / Craftsman wouldn't be here.
Words are tools right?  Does that mean you can copy a book and post it on the 'net?  Nope, there are rules, and TheSwamp follows the rules.


Quote from: pochrist
If I have to build a Shed Do I first need to Forge a Hammer and Nails and Hewn the wood? Silly think of.  If i can't Make the tool then I Buy it at the Store or Barter for it.
Ahhh, but before you can GIVE me a copy of your hammer, you need to BUY it first.  So before you give EVERYONE on the 'net a copy of that program, you need to pay for EVERY copy.

M-dub

  • Guest
A Donation with a Request....
« Reply #5 on: April 22, 2005, 02:24:42 PM »
pochrist,

Believe me when I say that everyone here wants to help out in any way we can, but please keep in mind that when there is the possibility of some type of copyright infringement, we must decide to err on the side of caution.  It is definitely not an attempt to turn you away or to upset you.

I understand your situation completely, and I think almost everyone has been in a similar situation at one time or another.  Unfortunately, I am unable to write lisp (one of these days, I swear! :roll:), but I'm sure that if you work with us, we can get something put together as a group effort.

I trust you understand our standpoint as well.

Fire comments back at me if you wish ;)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
A Donation with a Request....
« Reply #6 on: April 22, 2005, 02:42:41 PM »
I too use rotated VP's, all the time!! If I need many leaders with mtext for a certain section of the job then I create a new ucs based on a line or points then do my leader work. What I use the most is this little app I wrote that rotates text based on a selected object.
Code: [Select]

(defun c:rrt (/
               ; local functions
               getSegment get-opp-ang undobegin undoend
               ; local variables
               ent obj obj_typ ang ans
               )

  ;;; FUNCTION
  ;;; rotates the user selected (M)TEXT to the user selected
  ;;; entity. valid entites are light weight plines, lines
  ;;; and (m)text. you are given the chance to rotate the
  ;;; by 180 degrees after intial rotation.
  ;;;
  ;;; ARGUMENTS
  ;;; none
  ;;;
  ;;; USAGE
  ;;; enter RRT on the comand line
  ;;;
  ;;; PLATFORMS
  ;;; 2000+
  ;;;
  ;;; AUTHOR
  ;;; Copyright© 2004 Mark S. Thomas
  ;;; mark_AT_theswamp.org
  ;;;
  ;;; VERSION
  ;;; 1.0 Tue Dec 07, 2004
  ;;;
  ;;; TODO:
  ;;; handle text that has 'fit' justification
  ;;; add more entites for angle extraction
  ;;; more testing

  (vl-load-com)

  ;; credit Stig Madsen
  ;; refer to thread titled "relaxed-curves" under the "Teach Me"
  ;; section of TheSwamp at www.theswamp.org/phpBB2/
  (defun getSegment (obj pt / cpt eParam stParam)
    (cond ((setq cpt (vlax-curve-getClosestPointTo obj pt))
           (setq eParam (fix (vlax-curve-getEndParam obj)))
           (if (= eParam (setq stParam (fix (vlax-curve-getParamAtPoint obj cpt))))
             (setq stParam (1- stParam))
             (setq eParam (1+ stParam))
             )
           (list eParam (vlax-curve-getPointAtParam obj stParam)
                 (vlax-curve-getPointAtParam obj eParam))
           )
          )
    )

  ;; undo functions
  (defun undobegin ()
    (vla-EndUndoMark
      (vlax-get-property
        (vlax-get-acad-object)
        'ActiveDocument
        )
      )
    (vla-StartUndoMark
      (vlax-get-property
        (vlax-get-acad-object)
        'ActiveDocument
        )
      )
    )

  (defun undoend ()
    (vla-EndUndoMark
      (vlax-get-property
        (vlax-get-acad-object)
        'ActiveDocument
        )
      )
    )

  ;; returns the oppsite of an angle define in radians
  (defun get-opp-ang (ang)
    (cond ((< ang pi)(+ ang pi))
          ((> ang pi)(- ang pi))
          ((equal ang pi) 0.0)
          ((equal ang 0.0) pi)
          )
    )

  ;; ================= body of main function starts here ======================

  (cond ((setq ent (entsel "\nSelect entity for alignment: "))
         (setq obj (vlax-ename->vla-object (car ent))
               obj_typ (vlax-get-property obj 'ObjectName)
               )
         (cond ((= obj_typ "AcDbPolyline")
                (if (setq pt_lst (getSegment obj (last ent)))
                  (setq ang (angle (cadr pt_lst)(caddr pt_lst)))
                  )
                )
               ((= obj_typ "AcDbLine")
                (setq ang (vlax-get-property obj 'Angle))
                )
               ((= obj_typ "AcDbText")
                (setq ang (vlax-get-property obj 'Rotation))
                )
               ((= obj_typ "AcDbMText")
                (setq ang (vlax-get-property obj 'Rotation))
                )
               (T (alert "That's not an entity I deal with"))
               )
         )

        )

  (if ang
    (cond ((setq ent (car (entsel "\nSelect text to align")))
           (setq obj (vlax-ename->vla-object ent)
                 obj_typ (vlax-get-property obj 'ObjectName)
                 )
           (cond
             ((or (= obj_typ "AcDbMText") (= obj_typ "AcDbText"))
              (undobegin)
              (vlax-put-property obj 'Rotation ang)
              (setq ans (getstring "\nRotate 180 [Y/N]<N>: "))
              (if (= (strcase ans) "Y")
                (vlax-put-property obj 'Rotation (get-opp-ang ang))
                )
              (vlax-release-object obj)
              (undoend)
              )

             (T (alert "I only know how to align (M)TEXT, sorry! "))
             )
           )
          )
    )
  (princ)
  )


There is also a script/autolisp app floating around here somewhere that sets a new ucs based on a selected object and then starts the qleader command, perhaps a search will find it.
TheSwamp.org  (serving the CAD community since 2003)

daron

  • Guest
A Donation with a Request....
« Reply #7 on: April 22, 2005, 02:55:07 PM »
Quote from: pochrist
I didn't request for the Program to be Decompiled, But rather to used as a model and improved. I believe that is a common practise.  :wink:


Thanks again for the offer, but my understanding is that this model would be as mute as you asking for help if you knew how to write lisp. In other words, without decompiling (which we won't do) we can't see how it was written to improve upon it. As far as knowing how to write lisp, many of us here have that ability and still ask questions. So please, if you ever do get the knowledge, I hope you'll come around and share your insights and help other people who would be interested in learning from you.

CADaver

  • Guest
A Donation with a Request....
« Reply #8 on: April 22, 2005, 05:31:08 PM »
Quote from: pochrist
(2) Works with Mtext attached to Leaders (Q Leaders) The problem I have with this Routine is it will Line up the Text and Leave the attached Leaders "flapping in the breeze".
...
 It's the Line up routine that I love.
Okay, If Mark's offering is not exactly what you need.  Spell it out for us (psuedo code).  What is it EXACTLY you need the routine to do for you?  Somebody here with a little pleading, will most probably help you put one together.  

The thread at the very top of this thread explains The Swamp's philosophy (the "fish" is a some code).
    Just a note to the new-comers about this forum that is vastly different from most. This place, TheSwamp, is a fishing school, generally, it will teach you how to fish. Often, they will help you land a fish you've already hooked and occasionally they will even offer a piece of fish to get you over a rough spot. Then every now and again, someone will give you a fish. [/list:u]

    pochrist

    • Guest
    A Donation with a Request....
    « Reply #9 on: April 25, 2005, 11:00:33 AM »
    Well, Point taken, I was under the assumption once a company / entity went out of business that the products it produced be rendered worthless, and so "up for grabs"

    So as not to beat a dead horse, CADaver pointed out correctly that
    "Mark's offering is not exactly what I need" While still usefull, I already have a favorate utility that Rotates text.

    I will out line what the Routine in question Did:

    It allows the user to Line up multiple Individual Mtext Entities Vertically (Column style) or Horizontally (or Rows if you prefer)
     
    It also did this to a specified angle (but this was something I never used)

    In addition you could also specify a "spacing" between each Individual Mtext Entity (uselly defaulted at "0" and worked indepently)

    The Dialog was divided into 2 sections (1 for Aligning Mtext and the other for Spacing) You could only do One or the other, not Both.

    The procedure was such, the User launched application and picked,
    for example:

    1) "Align Mtext in Columns", click on "OK"

    2) User was then returned to Autocad and is prompted to "Pick the first Mext entitiy" (Or Master) Press enter and then select the Rest of the Mtext entities. (usually with a Window / crossing box)

    and Poof they are all Aligned (According to the Y coodordinate of the Master Mtext Entity. Of course it is also based in the Justification of the Individual Mtext Entities, I always made sure evey Mtext Entity had the same Justification.

    The Procedure is identical for Aligning Mtext in Rows and Angles (except for Picking 2 points for the Angle of Alignment.

    The Spacing section has a Check box and a Field to fill in desired a distance and then after you Click "OK" works like the previous routines in it's Selection Method.

    If anyone is interested a have a Routine called Tjust (I aguired from the Autodesk NG - which is not Copyrighted) If anyone feels the code in it can be usefull.

    Also if it is not "Illegal" I can Provide a Screen shot of the Dialog box if needed (just tell me where to upload it)

    Sorry if I caused a problem, just trying to salvage a usefull routine and great time saver. TIA

    daron

    • Guest
    A Donation with a Request....
    « Reply #10 on: April 25, 2005, 11:33:10 AM »
    I believe you can supply a screen shot. At the top of the forum is a link called images. You can upload it there and link to it.

    pochrist

    • Guest
    A Donation with a Request....
    « Reply #11 on: April 25, 2005, 12:06:10 PM »
    Here is the Screen Shot, Thanks Ok It is located in the Images / Pochrist Directory ( This is what you ment right?)



    *edit MST*
    Added image link to post

    daron

    • Guest
    A Donation with a Request....
    « Reply #12 on: April 25, 2005, 12:16:35 PM »
    That's it.

    CAB

    • Global Moderator
    • Seagull
    • Posts: 10401
    A Donation with a Request....
    « Reply #13 on: April 25, 2005, 02:26:51 PM »
    Found this is my library, July 2004

    Code: [Select]
    ;;;CADALYST 07/04 Tip1964:  TS.LSP      Text spacing       (c) 2004 Tracey Richmond

    ;This program will take a series of text strings, selected individually
    ;and in sequence, and revise the spacing between each line.  It doesn't
    ;matter what the justification is, as long as all justifications for picked
    ;text is the same.  Also, it uses the text height of the FIRST selected text
    ;as the multiplier, so it helps if the group of text you are aligning is the same height.
    ;


    http://new.cadalyst.com/code/browseyear.cfm?fullyear=2004


    Here is another

    Code: [Select]
    ;;;--------------------AlignTxt.lsp-----------------------------
    ;;; Purpose: Defines 3 commands
    ;;;   RotTxt: Rotates a selection of TEXT/MTEXT about their insertion points
    ;;;   Rot180: Rotates a selection of TEXT/MTEXT 180 ºabout their insertion points
    ;;;   AlignTxt: Aligns a selection set of TEXT/MTEXT with a selected entity
    ;;;   Supports noun-verb selection for all commands
    ;;; Usage: AutoCAD 2000 & later versions
    ;;; Version: 1.2
    ;;; Date this file: 20 October 2004
    ;;; Author: Herman Mayfarth, Tekton Construction Services

    ;;; Herman Mayfarth                hmayfarth@tktn.com
    ;;; Tekton Construction Services   www.tktn.com
    ;;; 909 W. 9th St.
    ;;; Corona, California 92882 USA
    ;;; Telephone: 951.371.5713



    What was special about the routine you were using?
    I've reached the age where the happy hour is a nap. (°¿°)
    Windows 10 core i7 4790k 4Ghz 32GB GTX 970
    Please support this web site.

    pochrist

    • Guest
    A Donation with a Request....
    « Reply #14 on: April 26, 2005, 11:13:06 AM »
    Quote
    What was special about the routine you were using?


    Well in short it works...Very simply.

    This version is very... Cumbersome, Confusing and vague.

    On the surface it would appear straight forward, But its not.

    If I choose to Align the text to an Existing Mtext entity it does, well ... nothing, That leaves me with drawing a line, then selecting the line and telling it to align to that line, which it then will Rotate 180 (which I did not choose as an option) I does however align to leaders nicely (if you have a need of that feature).

    The one I currently use is a snap, Pick the first Mtext entity, select the
    one(s) you want to align to it, poof all in line. It uses the Y coordinate of the fisrt mtext entity (or X if you choose a Row). But maybe I'm spoiled,  

    I'll think I'll have look around and spend more money, some body out there had to be as clever as this guy was with aligning text (He just never use Accounted for Rotated View ports I guess) Thanks anyway