Author Topic: Layer Creator Project  (Read 39368 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Layer Creator Project
« Reply #45 on: July 02, 2008, 05:21:03 PM »
T.Willey,
How do you code up some of these larger lisps in so little time...You must type 1000 words per min!?
Slowness at work, and lisp logic seems easier to me, as long as I'm not nesting lists three or four deep.  Then I have to think a little longer.

I will take this as a compliment.  Thanks John.   :-)
Tim

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

Please think about donating if this post helped you.

JohnK

  • Administrator
  • Seagull
  • Posts: 10636
Re: Layer Creator Project
« Reply #46 on: July 02, 2008, 06:01:38 PM »
took 3 seconds for 100 layers!?! *lol*
my dbx loads 100 layers in tenths of a second, so not a problem for me :)
*lol*
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10636
Re: Layer Creator Project
« Reply #47 on: July 02, 2008, 06:03:58 PM »
T.Willey,
How do you code up some of these larger lisps in so little time...You must type 1000 words per min!?
Slowness at work, and lisp logic seems easier to me, as long as I'm not nesting lists three or four deep.  Then I have to think a little longer.

I will take this as a compliment.  Thanks John.   :-)

And you should (not that you would be correct. *lmao* j/k; it is/was).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Layer Creator Project
« Reply #48 on: July 02, 2008, 07:41:52 PM »
My wish was to keep the data file as easy to maintain as possible.
Using the example file "Framing Layer Data File" I posted, you can still use tab
as the separator.
Where do you see the errors creeping in with that format?

1.) I dislike tabs in general so i disable them in my editor; i use spaces instead.
2.) A user in Notepad just hits the space bar instead of tab.
3.) A user uses two tabs instead of one.
...

But that uses ; as the seperator, not the TAB.
Where do you see the errors creeping in with that format?
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Layer Creator Project
« Reply #49 on: July 02, 2008, 07:48:45 PM »

The resolution is easy ..
use XML instead

:lol:

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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Layer Creator Project
« Reply #50 on: July 02, 2008, 08:02:45 PM »
How does John Doe edit the XML data file? <I'm XML ignorant> :?
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Layer Creator Project
« Reply #51 on: July 02, 2008, 10:11:39 PM »
How does John Doe edit the XML data file? <I'm XML ignorant> :?

I was 'sort-of' trying to indicate that XML does not have delineator issues .. the field value is directly accessable


This is one editor .. the one I use .. but you can use any text editor
Design Notes
http://msdn.microsoft.com/en-us/library/aa905339.aspx

Download from the link on this page
http://www.codeplex.com/xmlnotepad

or from here
http://www.microsoft.com/downloads/details.aspx?familyid=72d6aa49-787d-4118-ba5f-4f30fe913628&displaylang=en
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Layer Creator Project
« Reply #52 on: July 02, 2008, 11:59:36 PM »
Sorry Kerry, I was playing the devil's advocate. I don't think they are that user friendly.

I think the text file with a USER selected delineator character would work fine.
Obviously some characters would not be acceptable but the usual ; or , would work fine.

Seems there is a split for those who like the text file & those who prefer a DWG file.
Perhaps a pole would be in order.
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.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Layer Creator Project
« Reply #53 on: July 03, 2008, 07:39:07 AM »
OK. So the concensus is that there are those who use DWG's to store info and those who prefer to use text files to store info. So with that is there a way to design a layer creator that can take advantage of either condition?  Maybe a setting/ options section of the code.  having this would also allow a more flexible set up / organization.  The user could set his files were ever he wanted and the program would know were to go and get them.  They could also have more than one location for files.  Here you could also set default info in case the file is corrupt.

Maybe we can start a wish list of features and go from there.?

-FEATURES

-Text and/or ODBX capable
-Ability to overwrite existing layers in the dwg (for standardization)
-Support for Layer Groups


-WHISH LIST

-Fast
-User friendly
-Dialog and/ or cmd driven (so it can be used in scripts / batch programs - for standardization)


Go from here...
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

JohnK

  • Administrator
  • Seagull
  • Posts: 10636
Re: Layer Creator Project
« Reply #54 on: July 03, 2008, 08:44:17 AM »
In my experience delimited formats are better for the masses then my chosen format but this will be used mainly by your CAD mgr in buttons and scripts for his/her end users so whatever delimiter you choose should be fine. Create and use an RC file which can set any feature you wish. Or Choose a comma and call the file *.csv...

I will help write anything you want but after everything is done and said for, im going to use what I already have. I am going to use mine for several reasons: I choose the native layer dictionary format because I need/retrieve it in that format already so ultimately I can modify, sort, group, create, etc faster, easier and with less code then you can with a delimited format. Just because of that format, In a race, I would win; before we even left the starting gate `Orders of growth' state that I will be faster then anything you could write. I take pride in the fact that it takes me longer to move my cursor up and hit the button then my code takes to create 10,000 layers and all their properties. ...Speed was my main goal; i wrote mine because the company's previous app took 3-5 seconds for 100 layers.

DBX is good, but `text' files are better.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

hendie

  • Guest
Re: Layer Creator Project
« Reply #55 on: July 03, 2008, 08:48:18 AM »
forgive me if this has already been mentioned (I had a quick read through of the thread but didn't see it mentioned)

The ONLY way to prevent users making mistakes in text/data files is to prevent users from writing/editing text/data files.
Why not write a plug-in/add-on/utility, call it whatever you will - that creates those data files for the user ? That way you can check and control each entry in the file.
All you need is a dialog with all the parameters you will be looking for to create each data line. Use drop downs, check boxes and as many tools as possible to prevent the user from typing anything other than the layer name. When they're done they hit "Add" and the new data line is checked and added, or a warning given to the user


we've had experience of users creating their own files, and where possible I try to take it out of their hands, or give them a simple click to add type of thing - much less headache that way.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Layer Creator Project
« Reply #56 on: July 03, 2008, 09:05:53 AM »
Hendie - now THAT's a good idea . . .
James Buzbee
Windows 8

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Layer Creator Project
« Reply #57 on: July 03, 2008, 09:07:55 AM »
I agree Hendie that a user interface for data management is preferable. My only gripe is that the
interface routine is often more coding that the main application.

Quick look at the features needed in the interface.
Add a record
Del a record
Save to File
Add property to data list
Remove property from data list
Edit Default properties
Move Up/Down the Active Properties (rearrange the order)


If the user interface is used then the programmer chooses the format.
Comma delimited with ALL propertied having a field.
Part of the data file would be a header telling the routine which fields to load as active and which
would be inactive. The Order would be fixed by the programmer.

Out of time, I'll be back later. 8-)
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.

hendie

  • Guest
Re: Layer Creator Project
« Reply #58 on: July 03, 2008, 09:36:11 AM »
I realise that it is a lot of work. I found that to my cost when I wrote the AutoCAD Menu Generator a few years ago (and then they changed to CUI  :pissed: :pissed: :pissed:)

However, the up side is that it eliminates most problems and all user generated errors in one fell swoop.
The key is to make it easier for the user to use the GUI to create the files than it is for them to write the files by themselves.
Another benefit is that you can set default values on new records so that if the user ignores/forgets a field then it won't throw an error. You have complete control.

Once you look closer at it, the coding isn't that difficult.
For example, a record could only be added when all the fields are completed, then it's just a simple case of strcat..... and save to a list.
Save the file... write the list to a file
Delete a record... replace string with "DELETEME" and ignore that line when writing the file
Not sure exactly what you mean by add/remove property to data list
If you list all the properties, then the only thing the user will have to manually write is the layer name


JohnK

  • Administrator
  • Seagull
  • Posts: 10636
Re: Layer Creator Project
« Reply #59 on: July 03, 2008, 09:50:39 AM »
Is this a contest to see how complicated we can make this application or something? I think a separate UI is unnecessary. I have a "save-layer-list-to-file" function built into my layer creator proced -i.e. my UI for making layers is AutoCAD!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org