Author Topic: Whats wrong with this Lisp?  (Read 10856 times)

0 Members and 1 Guest are viewing this topic.

andrew_nao

  • Guest
Re: Whats wrong with this Lisp?
« Reply #15 on: July 13, 2009, 10:22:49 AM »
how did you get the text in the dialog box to be different colors?

or is that something you did to the image?

GDF

  • Water Moccasin
  • Posts: 2079
Re: Whats wrong with this Lisp?
« Reply #16 on: July 13, 2009, 12:20:51 PM »
Lee

Love your routines, thanks for sharing them.

When creating dialog boxes, I find it helpfully to format them and to make use of "widgets" (repeatable dcl code).
This makes it easier to read the code (similar to formatting lisp) for complex dialog boxes. Good job in
developing an easy to read dialog box.

I have enclosed examples of how I format my dcl code.

Code: [Select]
//To load master widgets used by Arch Program© for AutoCAD®
@include "..\\ARCH.dcl"
dcl_settings :default_dcl_settings {audit_level=0;}

ARCH_SEQ:dialog {key="set-title"; initial_focus="set-title"; width=93.3; height=21.875;
  :row { //children_fixed_width=true;
    :boxed_column {label="Insert Block \"SEQ\" Sequientially";           
      :radio_row { 
        :radio_button {label="Dtext";key="RM"; width=9.5;}
        :radio_button {label="Attribute";key="RM0"; width=9.5;}
        :radio_button {label="Bubble";key="RM1"; width=9.5;}
        :radio_button {label="Line";key="RM2";}       
      }
      :boxed_column {label="Sequiential Parameters:";       
        :row {
          :edit_box {key="prefix"; label="Prefix Value :"; edit_width=9;}
          :button {label="Clear"; key="clear_prefix"; width=9; fixed_width=true;}
        }
        :row {
          :edit_box {key="midfix"; label="Start Value :"; edit_width=4;}
          :button {label="Increment"; key="incr_number"; width=9; fixed_width=true;}
        }
        :row {
          :edit_box {key="suffix"; label="Suffix Value :"; edit_width=9;}
          :button {label="Clear"; key="clear_suffix"; width=9; fixed_width=true;}
        }           
        :radio_row {key="incr_what";
          :radio_button {label="Increment No"; key="incr_num"; is_tab_stop=false;}
          :radio_button {label="Increment Suffix"; key="incr_suf"; is_tab_stop=false;}
        }
      }   
      :spacer {}     
      :row {   
        //:toggle {label="Notes"; key="SEQNOTES";}
        //:toggle {label="Title"; key="SEQTITLE";}
        :popup_list {key="txsty"; width=19.25;}
        :arch_accept {label="Accept Insert";}     
      }     
      :spacer {}     
    }
    :boxed_column {label="Edit Block or Text Sequientially";
      :boxed_column {label="Attribute Tag Value"; key="at_box";
        :popup_list {label="Tag to Edit -->"; key="renum_at"; edit_width=12;}
        :spacer {}
      }
      :column {
        :edit_box {label="Preffix Value :"; key="renum_p"; edit_width=7;}
        :edit_box {label="Start Value :"; key="renum_sv"; edit_width=7;}
        :edit_box {label="Suffix Value :"; key="renum_s"; edit_width=7;}
      }
      :column {
        :edit_box {label="Increment Range ="; key="renum_i"; edit_width=7;}
      }     
      :spacer {}
      :row {       
        :button {label="Select Objects"; key="RENUMIT"; fixed_width=true;}
        :button {label="Accept Edit"; key="accept-renumit"; width=17; fixed_width=true;}
      }     
    }
  } 
  :row {
    :spacer {}
    :radio_button {label="Tread Cnt"; key="TRED"; width=17;}   
    //:radio_button {label="Place Dtx Only"; key="SEQTX";  width=17;}
    :radio_button {label="Edit Dtx and Blks"; key="SEQED";  width=17;}
    :radio_button {label="ReNumber"; key="NUM";  width=17;}
    :radio_button {label="Place Dtx Index"; key="INDEX";  width=17;} 
    :spacer {}   
  } 
  :arch_program_textstyle {arch_program_textstyle;}
}
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Lee Mac

  • Seagull
  • Posts: 12891
  • London, England
Re: Whats wrong with this Lisp?
« Reply #17 on: July 13, 2009, 12:55:50 PM »
Thanks GDF,

Tbh, I am quite new to DCL and have a lot to learn, CAB has taught me quite a bit in his contribution to my AutoNum routine.

Sorry if this is an obvious question but, do the Arch programs come with AutoCAD, or do you have to download them?

Thanks,

Lee

EDIT: just saw the attached DCL file, I must be blind  :oops:
« Last Edit: July 13, 2009, 12:59:04 PM by Lee Mac »

GDF

  • Water Moccasin
  • Posts: 2079
Re: Whats wrong with this Lisp?
« Reply #18 on: July 13, 2009, 01:14:23 PM »
Arch Program is my inhouse set of routines. All of the routines use the same set of subfunctions and dcl widgets.
Thus making each individual routine part of the overall package and not a stand-alone routine...which has its good points and bad.

I am just a newby as far as programming skills. So I ask a lot of questions and get help form all of the real programmers here at theswamp.

I have enclosed a old dated pdf file of the 12 major dialog boxes of the arch progarm set of routines. Most of the routines are old and clunky, but it's fun to tinker with.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Lee Mac

  • Seagull
  • Posts: 12891
  • London, England
Re: Whats wrong with this Lisp?
« Reply #19 on: July 13, 2009, 01:34:34 PM »
I must say, very impressive Gary - some great dialogs, loving the images & image buttons   :lol:

Thanks for sharing,

Lee

HasanCAD

  • Swamp Rat
  • Posts: 1414
Re: Whats wrong with this Lisp?
« Reply #20 on: July 16, 2009, 03:45:44 AM »
Code: [Select]
I have enclosed examples of how I format my dcl code.
Shouldnt the lisp be attached?
or it is non free lisp?


Lee Mac

  • Seagull
  • Posts: 12891
  • London, England
Re: Whats wrong with this Lisp?
« Reply #21 on: July 16, 2009, 06:43:52 AM »
Code: [Select]
I have enclosed examples of how I format my dcl code.
Shouldnt the lisp be attached?
or it is non free lisp?



If you are referring to the ARCH.dcl that Gary uploaded - it was just a set of DCL functions to be used as widgets within other code.


HasanCAD

  • Swamp Rat
  • Posts: 1414
Re: Whats wrong with this Lisp?
« Reply #22 on: March 24, 2010, 07:52:06 AM »
Lee

Thanks for great lisp
Could I please make some change in the code?
I want to change the text insertion point

Whats code line which control text insertion point?

Lee Mac

  • Seagull
  • Posts: 12891
  • London, England
Re: Whats wrong with this Lisp?
« Reply #23 on: March 24, 2010, 08:15:11 AM »
The text insertion point is determined through the GrRead loop - it is not just one line. Or were you referring to the text alignment?

HasanCAD

  • Swamp Rat
  • Posts: 1414
Re: Whats wrong with this Lisp?
« Reply #24 on: March 24, 2010, 09:06:45 AM »
Mr. Lee

Please see attached

Most of Civil work like that

Insert a point then insert a text next to the point
Then create a table with X, Y & Z (or N, E & Z) of the inserted points

All of that done by your lisp in a great way.
this lisp is helpful for Civil work
but these points if considered will be better
- Turn OSnap on to pick an object (such as a _cen, endp, ... etc)
- Insert a point
- Adding option to move text ( same as SPACE which rotate text)

finally
English is not my mother tongue so please take the light meaning of the word not bad meaning and the tutor should be respected
« Last Edit: March 24, 2010, 09:11:47 AM by asos2000 »

Lee Mac

  • Seagull
  • Posts: 12891
  • London, England
Re: Whats wrong with this Lisp?
« Reply #25 on: March 24, 2010, 09:43:55 AM »
Because the function uses a GrRead loop, OSnap functionality is not permitted and must be imitated. I updated my other version of this program, so that the user had the option of whether to use the GrRead loop or not, but I haven't updated this version as yet.

KOWBOI

  • Guest
Re: Whats wrong with this Lisp?
« Reply #26 on: March 24, 2010, 09:53:15 AM »
Lee, your programming skills are amazing as is your generosity.

Lee Mac

  • Seagull
  • Posts: 12891
  • London, England
Re: Whats wrong with this Lisp?
« Reply #27 on: March 24, 2010, 09:57:50 AM »
Thanks KOWBOI  :-)

FYI The updated version is here

HasanCAD

  • Swamp Rat
  • Posts: 1414
Re: Whats wrong with this Lisp?
« Reply #28 on: March 24, 2010, 10:00:01 AM »
Because the function uses a GrRead loop, OSnap functionality is not permitted and must be imitated. I updated my other version of this program, so that the user had the option of whether to use the GrRead loop or not, but I haven't updated this version as yet.

Which version has OSnap function?

Lee Mac

  • Seagull
  • Posts: 12891
  • London, England
Re: Whats wrong with this Lisp?
« Reply #29 on: March 24, 2010, 10:00:23 AM »
Because the function uses a GrRead loop, OSnap functionality is not permitted and must be imitated. I updated my other version of this program, so that the user had the option of whether to use the GrRead loop or not, but I haven't updated this version as yet.

Which version has OSnap function?

The one linked to above (OSnap is available if 'text follows cursor' is not set) - but it has no table.  :-(