Author Topic: We need a challenge!  (Read 16098 times)

0 Members and 1 Guest are viewing this topic.

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
We need a challenge!
« on: April 18, 2006, 04:26:33 AM »
Anyone have good challenge to put forth?

How about you ElpanovEvgeniy, I bet you could come up with a real good one. :-)
TheSwamp.org  (serving the CAD community since 2003)

hudster

  • Gator
  • Posts: 2848
Re: We need a challenge!
« Reply #1 on: April 18, 2006, 05:04:13 AM »
here you go.

write a lisp which when a drawing is opened, opens a text file adds the user name, date and time the drawing was opened and the drawing name.
Then when the drawing is closed, writes the total editing time for that session, and saves the log file to a central location.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Serge J. Gianolla

  • Guest
Re: We need a challenge!
« Reply #2 on: April 18, 2006, 05:04:57 AM »
A challenge you said!
How 'bout someone cracking the formula for Straight Skeletons for Roofs!  :-D
Was posted outside the challenge zone but users shy away for some reason.  :evil:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: We need a challenge!
« Reply #3 on: April 18, 2006, 05:15:39 AM »
A challenge you said!
How 'bout someone cracking the formula for Straight Skeletons for Roofs!  :-D
Was posted outside the challenge zone but users shy away for some reason.  :evil:

Serge, Do you have Martindales .. ?
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.

Serge J. Gianolla

  • Guest
Re: We need a challenge!
« Reply #4 on: April 18, 2006, 05:27:28 AM »
Serge, Do you have Martindales .. ?

?? THE MARTINDALES 21st Century Roots Rock
 No Kerry!  :laugh:

I'll investigate. Thanx

Serge J. Gianolla

  • Guest
Re: We need a challenge!
« Reply #5 on: April 18, 2006, 05:31:57 AM »
Is this what you meant Kerry?

http://www.martindalecenter.com/

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: We need a challenge!
« Reply #6 on: April 18, 2006, 06:02:58 AM »
Nope , hang about ..
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: We need a challenge!
« Reply #7 on: April 18, 2006, 06:19:36 AM »
It's about 1.2 Meg .. can you PM your email , or Messenger address..

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.

Serge J. Gianolla

  • Guest
Re: We need a challenge!
« Reply #8 on: April 18, 2006, 06:26:34 AM »
It's about 1.2 Meg .. can you PM your email , or Messenger address..


Done... Hopefully

hendie

  • Guest
Re: We need a challenge!
« Reply #9 on: April 18, 2006, 06:54:59 AM »
Anyone have good challenge to put forth?


what about a series of challenges over time, that once complete, can be combined to create a suite of applications, or one (much larger) useful utility.

One idea that springs to mind is something that has been floated here before.... a mini EDMS or some form of document management utility.
Spec out what the doc mangement utility would require in terms of functions then issue each one as a challenge.
Once all the challenges are complete, combine them to form the full program, make it free for all swampers and offer it for a nominal fee to outsiders... or free to all participants (whether their routine is chosen or not) and for a nominal fee to anyone else. It would help with the upkeep of the swamp !

Challenge: Routine to create a new database in Access with a table containing a field for each atttribute in a user selected titleblock.
Must prompt user to select titleblock
Must prompt user for name and location of database
Must also add fields for path and filename and ... ?

Challenge: Routine to check if drawing exists in database when closing, if not, prompt user to add to database

Challenge: Routine to save titleblock information back to database when save/close drawing

Challenge: Routine to check if drawing exists in database when opening, if not, then prompt user to add dwg to database

Challenge: Routine to check drawing upon opening and update attribute values in titleblock from database

Challenge: Routine to open drawing from database.

Challenge: Routine to copy file, renaming and relocating in the process

Challenge: Routine to create new table based upon user selection of a block within the drawing.
table must contain a field for all block attributes along with drawing filename and path

etc etc. Obviously it would need to be spec'd out properly, but there's no reason why Swampers could not create a relatively straight forward simple EDMS that could be used by all.

There's something in there for both Lispers and VBA'ers and each challenge in itself is not too difficult, but could have a good learning curve for participants and end up creating an extremely useful utility for alll to enjoy.

nivuahc

  • Guest
Re: We need a challenge!
« Reply #10 on: April 18, 2006, 07:02:06 AM »
How about a routine in your choice of programming language that translates regular expressions into plain english in real time ;)

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
Re: We need a challenge!
« Reply #11 on: April 18, 2006, 07:16:28 AM »
How about a routine in your choice of programming language that translates regular expressions into plain english in real time ;)
whiskey tango foxtrot? 
TheSwamp.org  (serving the CAD community since 2003)

nivuahc

  • Guest
Re: We need a challenge!
« Reply #12 on: April 18, 2006, 07:26:07 AM »
How about a routine in your choice of programming language that translates regular expressions into plain english in real time ;)
whiskey tango foxtrot? 

That's my line! :lmao:

Regular expressions
Quote
A regular expression (abbreviated as regexp or regex, with plural forms regexps, regexes, or regexen) is a string that describes or matches a set of strings, according to certain syntax rules. Regular expressions are used by many text editors and utilities to search and manipulate bodies of text based on certain patterns. Many programming languages support regular expressions for string manipulation. For example, Perl and Tcl have a powerful regular expression engine built directly into their syntax. The set of utilities (including the editor sed and the filter grep) provided by Unix distributions were the first to popularize the concept of regular expressions.


So, for example, when I type
Code: [Select]
H(ä|ae?)ndel
It would return
Quote
Händel or Handel or Haendel

Or vice-versa :-)

Shinyhead

  • Guest
Re: We need a challenge!
« Reply #13 on: April 18, 2006, 07:30:38 AM »
If I may make a request for a challange that has been stumping me.
We do a lot of dimedits to dimension text such as EQ. A, EQ. B, EQ. B+1/2" etc.
There are far too many variations for scripts to really handle and I cannot use lisp due to all the LT machines.

I have been thinking a routine which prompts you for a dim edit, then you simply click on the dims you need changed.
Here is the hard part, how can you do that AND put in line returns (\P), I have been trying to figure this out FOREVER.
I can make it work without the \P, but once I need a line return I can no longer automate it.

A typical dimedit script would be as follows

dim
new
<>\P(VIF.)
;

but if I wanted to get a user value instead of \P(V.I.F.) I know of no way to pass this to dimedit (no diesel in scripts) and in the macro you cannot pass \P to the dimedit as it cant read the slash properly outside of the script.

I could save the company a lot of money if I worked around this one.

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
Re: We need a challenge!
« Reply #14 on: April 18, 2006, 07:33:28 AM »
That's my line! :lmao:
Yea I know, I've been waiting a long time to use too. :-)

So, for example, when I type
Code: [Select]
H(ä|ae?)ndel
It would return
Quote
Händel or Handel or Haendel

Or vice-versa :-)

That would be a challenge for me! I currently use a firefox plugin to test re's, it will highlight the match as you enter the regex. I think it uses pcre lib but I'd have to check.

EDIT: Formatted that for ya, Bro ;)
« Last Edit: April 18, 2006, 07:37:25 AM by nivuahc »
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
Re: We need a challenge!
« Reply #15 on: April 18, 2006, 07:37:07 AM »
-- Chuck
Here's the regex plugin I use. [ https://addons.mozilla.org/addon.php?id=2077 ]
TheSwamp.org  (serving the CAD community since 2003)

nivuahc

  • Guest
Re: We need a challenge!
« Reply #16 on: April 18, 2006, 07:39:25 AM »
I think it would be a good challenge for everyone. It would give the seasoned programmer an opportunity to test their skills with regards to regex and it would help the noobs who look at regex and think "whiskey tango foxtrot?" understand better how they work. Win-Win situation for everyone, imo. :)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: We need a challenge!
« Reply #17 on: April 18, 2006, 07:43:31 AM »
If I may make a request for a challange that has been stumping me.
We do a lot of dimedits to dimension text such as EQ. A, EQ. B, EQ. B+1/2" etc.
...............................


Shinyhead ,

A relatively simple way to achieve your result would be using a couple of menu 'pages'. You could cassify the type of note and have similar classes on child-pages.
I've tried a couple of ways to solve this issue, but not with LT < which may negate the use of dialogs >
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.

Shinyhead

  • Guest
Re: We need a challenge!
« Reply #18 on: April 18, 2006, 07:58:29 AM »
LT does make it a challenge. Most hardcore CAD'ers consider LT crippled Autocad, but really it is an EXTREMELY capable program if you are doing 2d drafting. It is only the lack of lisp and vba that gripes me.  For LT customization, basically once you hit the dialog box the macro is over, makes using filters and qselect out of the question and there is no other way I know of without lisp to filter a selection. If I could get by that, I could do ALMOST anything 2d with LT that I could ever want.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: We need a challenge!
« Reply #19 on: April 18, 2006, 08:29:33 AM »
A typical dimedit script would be as follows

dim
new
<>\P(VIF.)

Have you tried?
<>\X(VIF.)

Note X must be upper case.
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.

Shinyhead

  • Guest
Re: We need a challenge!
« Reply #20 on: April 18, 2006, 08:45:25 AM »
That script works already, I am just trying to figure a way to pass a string to replace (V.I.F.) that can be set during the session. 
I.E. if the draftsmen needs to edit a whole bunch of dims to <> + 1/2"/P(V.I.F.) I would like them to be able to hit a button on the palette, enter the text they want added and have them be able to edit text to call the dimedit until the session ends or they need to change the edit text to something else.  Ideally by setting USERS1 to the text then passing that to ddedit without lisp or a script (no diesel in scripts), the \ gets interpeted as a pause for user input when part of a macro, thus it causes the macro to not pass on the line return.  He is an example of what I would like to do in a macro

Set the string to users1
^C^C_setvar;users1;\

Then automate the editing of dimtext to that value

^C^C_dimedit;n;<>$m=$(getvar,users1);\

but if users1 has a "\" it will not work.

Its an annoyingly simple problem I can't figure out how to work around :x.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: We need a challenge!
« Reply #21 on: April 18, 2006, 09:25:09 AM »
OK, I see now. Without lisp I see no solution.
In lisp I overcame this problem by creating a temporary text entity with the string already in it.
Then deleted the temporary entity when done.
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.

Shinyhead

  • Guest
Re: We need a challenge!
« Reply #22 on: April 18, 2006, 09:34:12 AM »
I am starting to consider different ways of doing it. We had a fellow in the office figure out how to do it with excel and LT, but its a bit slow and clunky for my taste, I am thinking about ways to maybe paste or some such instead, dunno though yet.

Didge

  • Bull Frog
  • Posts: 211
Re: We need a challenge!
« Reply #23 on: April 18, 2006, 10:41:43 AM »
Automatically recording draughting time on a per-drawing or per-project basis gets my vote.

I would love to replace the tedious weekly timesheet calcs with a single button.
Think Slow......

LE

  • Guest
Re: We need a challenge!
« Reply #24 on: April 18, 2006, 11:19:46 AM »
Things like:

1. How to return an angle in decimal degrees?
2. How to get all the intersections from a selection of objects?
3. How to indicate graphically the direction of a line or polyline?
4. How to convert circles to polylines, without using bpoly?
5. How to verify if the UCS is in world coordinates, if not modified to world.
6. How to sort points over a circumference, according to distance from a point x.
7. How to know if a number is positive an greater than zero?
8. How to convert UTM coordinates to latitude and longitude?
9. How to convert LAT/LON to UTM?
10. How to calculate the area below a line given two points?

Maverick®

  • Seagull
  • Posts: 14778
Re: We need a challenge!
« Reply #25 on: April 18, 2006, 11:34:19 AM »
  Create a print "log"  including a prompt for job and purpose (subcontractor, customer, vendor, etc.)

  BTW I don't use Acad or know the slightest thing about programming. (Although I'd like to dive in when I get free time. HA!)

  This would just be an awesome tracking/cya thing I think.

M-dub

  • Guest
Re: We need a challenge!
« Reply #26 on: April 18, 2006, 11:42:23 AM »
One I've been thinking about for a long time, but have never done anything about it...
In addition to Save and Saveas, it would be nice to have a Rename function which would basically SaveAs, then delete the original... with an 'Are you sure' message, of course.

/idea

LE

  • Guest
Re: We need a challenge!
« Reply #27 on: April 18, 2006, 11:59:36 AM »
A challenge you said!
How 'bout someone cracking the formula for Straight Skeletons for Roofs!  :-D
Was posted outside the challenge zone but users shy away for some reason.  :evil:

Not an easy one.... it will required a lot of math.... and geometry.... I wonder what is the level on those two, here of the swampers?...   :-)

Maverick®

  • Seagull
  • Posts: 14778
Re: We need a challenge!
« Reply #28 on: April 18, 2006, 12:00:46 PM »
How about something that played an MCHammer .wav (Can't touch this) everytime someone opened a "read-only" doc? 

CADaver

  • Guest
Re: We need a challenge!
« Reply #29 on: April 18, 2006, 03:10:48 PM »
I.E. if the draftsmen needs to edit a whole bunch of dims to <> + 1/2"/P(V.I.F.) I would like them to be able to hit a button on the palette, enter the text they want added and have them be able to edit text to call the dimedit until the session ends or they need to change the edit text to something else. 
You know, you can select several dims at once for this and they will all change?

Sdoman

  • Guest
Re: We need a challenge!
« Reply #30 on: April 18, 2006, 03:24:57 PM »
How about something that played an MCHammer .wav (Can't touch this) everytime someone opened a "read-only" doc? 

 :lmao:  I like that !
 

Zibnaf

  • Guest
Re: We need a challenge!
« Reply #31 on: April 18, 2006, 03:54:42 PM »
Maybe I posted this on the wrong page.

http://www.theswamp.org/index.php?topic=9675.0

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: We need a challenge!
« Reply #32 on: April 18, 2006, 09:12:00 PM »
Here is something that may give a challenge. 

Select your plotting area with a floating paper window that user can locate the desired center of this paper window.  The size of this paper window would be based on the size of the paper selected and the desired scale.   I picture using the default plotting dialog box so as that you can have all the default features of Autodesk.  When opening selected the user will be taken to editor window in similar fashion as when the Window option.  The user would see the outline of paper edge and can float it over the geometry until the user selects the desired center of this floating paper window.  ACAD then would only plot what is inside the limits of the floating paper window.

We have in the Office a cad program called DrawBase.  Anybody knows of it.  IMHO, it lousy cad program that I had the misfortune of trying to learn.  Basically, you had to turn logically cad thinking inside out then upside down.  However in it defense there was few good attributes.  One was this plotting feature. 
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

FengK

  • Guest
Re: We need a challenge!
« Reply #33 on: April 19, 2006, 03:02:05 AM »
Anyone have good challenge to put forth?


what about a series of challenges over time, that once complete, can be combined to create a suite of applications, or one (much larger) useful utility.

One idea that springs to mind is something that has been floated here before.... a mini EDMS or some form of document management utility.
Spec out what the doc mangement utility would require in terms of functions then issue each one as a challenge.
Once all the challenges are complete, combine them to form the full program, make it free for all swampers and offer it for a nominal fee to outsiders... or free to all participants (whether their routine is chosen or not) and for a nominal fee to anyone else. It would help with the upkeep of the swamp !

Challenge: Routine to create a new database in Access with a table containing a field for each atttribute in a user selected titleblock.
Must prompt user to select titleblock
Must prompt user for name and location of database
Must also add fields for path and filename and ... ?



If anyone is taking a stab at this one.  Jon Fleming's ADOLISP (do a Google search) might be of help.