Author Topic: Intermediate Challenge - Building Outline  (Read 7144 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Intermediate Challenge - Building Outline
« Reply #15 on: April 29, 2008, 09:35:56 PM »
OK this is a rough draft with limited testing. 8-)
<edit: added UNITS detection for Feet or Inches>
<edit: added more comments, added to Help, changed keys to string, added ability to change Line Mode at any prompt.>
<edit: added error handler>
ESCAPE will result in the elimination of lines drawn.
« Last Edit: May 01, 2008, 01:19:16 PM by CAB »
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.

Dinosaur

  • Guest
Re: Intermediate Challenge - Building Outline
« Reply #16 on: April 29, 2008, 11:06:53 PM »
Unless I am missing something, this still scales everything up 12 when the drawing is in decimal units.  On reflection, just using it as is and scaling down when finished may be better than doing it within the routine as we get some rounding weirdness converting to 2 decimal places from arch., especially when fractions get involved.  Otherwise, this seems to work quite well after I finally read the input instructions.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Intermediate Challenge - Building Outline
« Reply #17 on: April 29, 2008, 11:52:45 PM »
Glad it worked for you. My intent was to provide input flexability with a minimum of key strokes.
I work in ACAD with inches as my primary unit of measure but entering foundation from a hand drawn plan I need feet and don't want to have to enter the foot and inch marks. This works well for me. I assume from you comments that you use feet as your units?

Keep in mind that this is my first draft & only two other have contributeted to the thread.
I got some good ideas from Tim's work as my original thought was to get the distance & options via grread.
The 5 key for angle is a good one.

As for the Units, I might add some code to detect the DWG units & compensate for that in the calculations.

PS I need to add an error routine to clean up any line left behind if the user Escapes.
« Last Edit: April 30, 2008, 12:03:33 AM by CAB »
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.

Dinosaur

  • Guest
Re: Intermediate Challenge - Building Outline
« Reply #18 on: April 30, 2008, 12:20:21 AM »
Yes, decimal units with the drawing set to feet - no choice as our design software needs that to work.  I can't even enter a distance in foot and inch format.  I have to convert them to decimal first and if the distances are strange enough, the numbers don't close even when the line work does.  What complicates things more is my program will add a length label as a connected element to each segment and won't allow any fudge factor unless I make a special expression or hold my nose make the number manually.  I prefer to keep it in the program in because if the building moves, mirrors or rotates the lengths follow along and reposition automatically.  Yes, I am very spoiled and lazy.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Intermediate Challenge - Building Outline
« Reply #19 on: April 30, 2008, 08:16:01 AM »
What is your INSUNITS set to? 2 perhaps?

OK revised the code above to detect  Feet or Inches from INSUNITS.
You should be able to use fractions now.
« Last Edit: April 30, 2008, 08:31:19 AM by CAB »
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.

litss

  • Guest
Re: Intermediate Challenge - Building Outline
« Reply #20 on: April 30, 2008, 10:25:19 AM »
Nice routine, CAB!

One suggestion:

Would it be better to combine the "Pick Direction" part with the "Enter direction and distance [825=90 deg for 25'/Help/Undo]" part by using the "getpoint" function instead of the "getstring". We can input pre-defined direction by keyboard like 45,90 ect. At the same time, we can also use mouse to pick a special direction at any time needed. As to the key "5", I suggest, it could be use as the trigger for special direction input. We could input special num, like "536-6000". Here, "5" means special direction input triggered, "36" means the direction of line, "6000" means the length of line. You might need a "-" to seperate direction and length in case of mistreating special direction like "37.5", "97.52" or "185" ect.

This way, the input might be more easy, would it?


Dinosaur

  • Guest
Re: Intermediate Challenge - Building Outline
« Reply #21 on: April 30, 2008, 10:49:01 PM »
What is your INSUNITS set to? 2 perhaps?

OK revised the code above to detect  Feet or Inches from INSUNITS.
You should be able to use fractions now.
I still have insunits set to 0 because of a bunch of old blocks and older drawings containing them, but this works perfectly with it set to 0 as well.  Thanks for the addition . . . there will be fewer blasphemous words issued for architects and their drawings from our office henceforth.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Intermediate Challenge - Building Outline
« Reply #22 on: April 30, 2008, 11:53:52 PM »
litss,
Glad you like the routine and thanks for your suggestion.
My thought is that the User angle [5] would seldom be used, so I can't get excited about improving it beyond its present functionality.
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Intermediate Challenge - Building Outline
« Reply #23 on: April 30, 2008, 11:54:46 PM »
Stephen,
Glad it is going to be a useful lisp for you.
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.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Intermediate Challenge - Building Outline
« Reply #24 on: May 01, 2008, 08:17:32 AM »
man Alan, i never thought this routine would get to this point. i was happy when keith helped me with my conditions, but this...is...AWESOME.

thanks so much
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Intermediate Challenge - Building Outline
« Reply #25 on: May 01, 2008, 09:13:29 AM »
Thanks Alan.

Just updated the code
added more comments
added to Help
changed keys to string for readability
added ability to changed Line Mode at any prompt
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.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Intermediate Challenge - Building Outline
« Reply #26 on: May 01, 2008, 09:35:41 AM »
CAB,
Another keeper

SWeeet!
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

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Intermediate Challenge - Building Outline
« Reply #27 on: May 01, 2008, 12:04:32 PM »
I finally had a chance to test it, nice work Alan.  I think you did a good job, and I don't think I need to compete anymore.  :kewl:
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Intermediate Challenge - Building Outline
« Reply #28 on: May 01, 2008, 01:08:09 PM »
Thanks Ted.

Tim,
I just had more time to invest in this LISP and did nothing that you wouldn't had you had the time.
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Intermediate Challenge - Building Outline
« Reply #29 on: May 01, 2008, 01:20:28 PM »
One more update, added error handler
ESCAPE will result in the elimination of lines drawn.

Code is here:
http://www.theswamp.org/index.php?topic=22796.msg274577#msg274577
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.