Author Topic: Can someone steer a noob in the right direction?  (Read 12798 times)

0 Members and 1 Guest are viewing this topic.

NoTebowNoHope

  • Guest
Can someone steer a noob in the right direction?
« on: January 05, 2012, 05:57:54 PM »
I have limited programming knowledge so please bare with me.

What I want to accomplish:

- Make a layer that is created from a dialog box that contains scroll boxes that references external lists.

       Box1    Box2    Box3    Box4
Ex:     1          2         3         4     =   Layer Name:  1234

What is the best way to do this; and does someone have something already created that is similar that I could use as a starting point?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Can someone steer a noob in the right direction?
« Reply #1 on: January 05, 2012, 06:11:24 PM »
Hum  :?
Why in the world would you want a layer named 1234?


Tim Willey had a DCL that would handle multiple pull down list.
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.

BlackBox

  • King Gator
  • Posts: 3770
Re: Can someone steer a noob in the right direction?
« Reply #2 on: January 05, 2012, 06:15:05 PM »
Why wouldn't you just standardize your layers in a template?  :?

Edit -
You could also incorporate the layers in code (or pull from .CSV, .XLS(x), etc.).

Then again it appears that you're stringing the box contents together without hyphens in between, so why not just have one box? Or am I missing something?
« Last Edit: January 05, 2012, 06:18:38 PM by RenderMan »
"How we think determines what we do, and what we do determines what we get."

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: Can someone steer a noob in the right direction?
« Reply #3 on: January 05, 2012, 07:27:33 PM »
I personally think its a good idea - a nice way to limit users to creating standardised layers when required.

I should say that the '1234' example was just that, an example.

So, back to more pressing matters: you will need to create the dialog using DCL, this can be a separate file, or a file created by the LISP program (I prefer the latter).

Are you sourcing the lists for the dialog from an external file, or hard-coding them into the program?

Creating the layer is the easy part of this task, there are many ways this can be done, using the command, AutoLISP, or Visual LISP.

NoTebowNoHope

  • Guest
Re: Can someone steer a noob in the right direction?
« Reply #4 on: January 05, 2012, 07:33:01 PM »
Why wouldn't you just standardize your layers in a template?  :?

Edit -
You could also incorporate the layers in code (or pull from .CSV, .XLS(x), etc.).

Then again it appears that you're stringing the box contents together without hyphens in between, so why not just have one box? Or am I missing something?
I would separate the strings with a hyphen I just didn't show it above.

Ex: S-LANDSCAPE-P-SHRUB

We do not want to use a standard template to allow some flexibility to each user based on their project. I would like to list all the modifiers in a list and let the user create the last portion of the description such as "SHRUB" from above.

NoTebowNoHope

  • Guest
Re: Can someone steer a noob in the right direction?
« Reply #5 on: January 05, 2012, 07:37:09 PM »
I personally think its a good idea - a nice way to limit users to creating standardised layers when required.

I should say that the '1234' example was just that, an example.

So, back to more pressing matters: you will need to create the dialog using DCL, this can be a separate file, or a file created by the LISP program (I prefer the latter).

Are you sourcing the lists for the dialog from an external file, or hard-coding them into the program?

Creating the layer is the easy part of this task, there are many ways this can be done, using the command, AutoLISP, or Visual LISP.
The lists would be handled from an external file...maybe a txt file.

I'm just not sure where to start.

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: Can someone steer a noob in the right direction?
« Reply #6 on: January 05, 2012, 07:43:37 PM »
I'm just not sure where to start.

I don't have much time, but here is a quick DCL layout:

Code: [Select]
customlayer : dialog { label = "Create Layer"; spacer;
    : boxed_column { label = "Layer Name";
        : row {
            : popup_list { key = "pop1"; }
            : popup_list { key = "pop2"; }
            : popup_list { key = "pop3"; }
            : edit_box   { key = "desc"; }
        }
        spacer;
    }
    ok_cancel;
}

NoTebowNoHope

  • Guest
Re: Can someone steer a noob in the right direction?
« Reply #7 on: January 05, 2012, 07:52:36 PM »
I'm just not sure where to start.

I don't have much time, but here is a quick DCL layout:

Code: [Select]
customlayer : dialog { label = "Create Layer"; spacer;
    : boxed_column { label = "Layer Name";
        : row {
            : popup_list { key = "pop1"; }
            : popup_list { key = "pop2"; }
            : popup_list { key = "pop3"; }
            : edit_box   { key = "desc"; }
        }
        spacer;
    }
    ok_cancel;
}
Thanks for the info. I will use this as a starting point and see what I can come up with.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
« Last Edit: January 05, 2012, 10:37:51 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.

NoTebowNoHope

  • Guest
Re: Can someone steer a noob in the right direction?
« Reply #9 on: January 05, 2012, 11:08:01 PM »
Cab, thanks for the links. I'm going to give this a try and see what I come up with.

NoTebowNoHope

  • Guest
Re: Can someone steer a noob in the right direction?
« Reply #10 on: January 07, 2012, 02:41:34 PM »
Ok this task is a bit over my head. I will pay someone to create a lsp routine and dialog box that does the following:

*Build a layer from multiple external lists with the option of changing the color and linetype (see attached image for example).

I can give more detail if someone is interested in making some cash.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Can someone steer a noob in the right direction?
« Reply #11 on: January 07, 2012, 11:19:18 PM »
Looks easy enough but does require quit a few lines of code.
How soon do you need it?
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.

NoTebowNoHope

  • Guest
Re: Can someone steer a noob in the right direction?
« Reply #12 on: January 08, 2012, 09:02:44 AM »
Looks easy enough but does require quit a few lines of code.
How soon do you need it?
Sometime in the next two weeks would be great if you could squeeze it in. The sooner I get everyone on the same page the less hair I will lose  :lol:

Let me know how you want to work out payment. I could paypal half up front and the other half when complete?

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Can someone steer a noob in the right direction?
« Reply #13 on: January 09, 2012, 01:53:39 AM »
Here, I've finished my version... It has some lacks : you must set color and line-type before dialog starts and preview is displayed only after you press button for preview...

I hope you'll be satisfied for now and I don't know ab payment... I am from Serbia, Europe, so forget it. At least I hope someone else will find it useful...

You can edit line :
(setq lst (list "MASTER" "DETAILED" "LANDSCAPE")) to make more choices... Else is done by your posted *.png

Sincerely, M.R.

EDIT : Forgot to add line (vl-file-delete fname)...

EDIT : Lacks that occur for color and line-type are removed... Also if you have preview, you can simply press OK...
« Last Edit: January 09, 2012, 08:27:55 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Can someone steer a noob in the right direction?
« Reply #14 on: January 09, 2012, 08:36:50 AM »
Info post - codes *.lsp files updated... Removed inspected lacks...

M.R.
 8-)
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube