Jump to content

Legend Check Box


russell84

Recommended Posts

Hey guys

 

I really would like to get some help in a getting a starting place to make a legend checkbox button.

 

I'd like to create a button that would bring up a list of symbols and lines with a check box next to them and once all symbols and lines are checked and insert button down the bottom of the list and finally a insert comand - just at scale 1:1

 

Any ideas?

 

Could each symbol be a separate block that is inserted with the appropriate text?

 

Thanks for any help

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 34
  • Created
  • Last Reply

Top Posters In This Topic

  • russell84

    7

  • Lee Mac

    7

  • mauserp08

    7

  • asos2000

    3

Top Posters In This Topic

Posted Images

  • 3 weeks later...

I'm now looking at using dcl

 

i'm currently just setting up a dcl file at the moment - would be handy if someone had a example i could go off.

 

cheers

Link to comment
Share on other sites

  • 6 months later...

MMmm...I'm looking for just a tool, but I have no programming experience.

 

Does anyone know of a solution?

 

I have tried a script by Peter Jamtgaard, but it seems a little unstable on my setup.

 

I'd also appreciate a count function, which would tell you how may occurrences of the block exist in the drawing.

 

Icing on the cake would be a simple math function, to multiply an attribute numerical value, by the qty. (I do lighting design, and would like to calculate the total load for example).

 

Cheers

Graham

Link to comment
Share on other sites

i have a legend creater written that simply inserts blocks that describe linetypes and symbols throughout a drawing.

 

Its old and kinda messy because it was one of the first lisp/dcl routines i wrote.

 

But it doesn't check what blocks are contained within a drawing - it only works by manual ticking of the check boxes.

 

You could create something more advanced if you want but its up to you.

 

My one at the moment just inserts differnt blocks that were set up for different scales

 

ive attached a pic of the result

 

also a pic of the form.

 

i'll give you the code if you want for it all and you can edit it from there.

 

Atleast its a start you know.

 

But what you are talking about you will need some experience and help with writing it to suit your needs

 

Let me know if you want it

Clipboard01.jpg

Clipboard02.jpg

Link to comment
Share on other sites

  • 3 weeks later...

Hi Russell,

Sorry for not getting back sooner....new to all this!

I fumbled through the drawings I needed to do, but this is something I'd like to crack, so any help would be marvellous.

 

With my workload, I really don't have time to learn programming (as much as I would like to) so I need to use what I can find.

 

Thanks again for taking the time to reply.

 

Graham

Link to comment
Share on other sites

  • 3 weeks later...

Thanks Russell

 

but there is a question, could that lisp read from a folder?

means, I created a seperete file and saved in a folder (and sub-folders for groups like Roads, Jointing ...) for each detail, and the lisp reads those files and show the groups in window

Link to comment
Share on other sites

  • 2 weeks later...

Russell,

Your Legend Creator look great.

you wouldn't want to share the Lisp and DCL file would you?

I'm still learning how to write lisp programs. I started out using a "Ksoft DCL & AutoLisp generator program, but dosen't completly finish

creating the lisp & DCL file. But I learning to Manipulate lisp files.

Link to comment
Share on other sites

Hey this lisp was one of my first - it is kind of messy but if you find anything useful within it go for it.

 

I need to write it properly now that i know a bit more about lisp and vba etc but that will be when i have the ime - it works for now.

 

here is the dcl i'll post the lisp next

 

dcl_settings : default_dcl_settings { audit_level = 0; }
LEGEND : dialog {
label = "LEGEND CREATOR v1.0";
 :column {
  :row {
   :text {
    key = "text1";
    width = 30;
    label = "Make a selection";
   }
   :row{
    :button{
     label = "Select All";
     key = "selall";
     fixed_width = false;
    }
    :button{
     label = "Deselect All";
     key = "selnone";
     fixed_width = false;
    }
   }
  }
  spacer_0;
  :boxed_row{
   label = " Sedimentation ";
   :column{
    :toggle{
     key = "t1";
     label = "CatchDrain                       ";
    }
    :toggle{
     key = "t2";
     label = "Low Flow Bank ";
    }
    :toggle{
     key = "t3";
     label = "Traffic Manoeuvring";
    }
}
   :column{
    :toggle{
     key = "t4";
     label = "OverFlow Path              ";
    }
    :toggle{
     key = "t5";
     label = "Sediment Fence";
    }
   
:toggle{
     key = "t6";
     label = "Vehicle Shaker Grid";
    }
}
:column{
    :toggle{
     key = "t7";
     label = "Stabilised Site Access       ";
    }
    :toggle{
     key = "t8";
     label = "Stockpile Location";
    }
    :toggle{
     key = "t9";
     label = "Straw Bale Filter";
    }
}
:column{
    :toggle{
     key = "t10";
     label = "Geotextile Inlet Filter ";
}
   
    :toggle{
     key = "t11";
     label = "Mesh && Gravel Inlet Filter";
    }
//    :toggle{
//      key = "t12";
//     label = "Temp Rock Headwall";
//     }
//     :toggle{
//      key = "t13";
//      label = "Proposed Rip Rap";
//     }
spacer_1;
   }
   
    :column{
     fixed_height = true;
    :button{
     label = "ON ";
     key = "selall1";
     fixed_width = true;
     alignment = centered;
    }
    :button{
     label = "OFF";
     key = "selnone1";
     fixed_width = true;
     alignment = centered;
    }
   }
  }
  :boxed_row{
   label = " Roads && Drainage ";
   :column{
    :toggle{
     key = "t14";
     label = "Limit of Work           ";
    }
    :toggle{
     key = "t15";
     label = "Bdy Existing";
    }
    :toggle{
     key = "t16";
     label = "Bdy Proposed";
    }
    :toggle{
     key = "t17";
     label = "Ridge Line";
    }
    :toggle{
     key = "t18";
     label = "Valley Line";
    }
    :toggle{
     key = "t19";
     label = "Subsoil Proposed";
    }
    :toggle{
     key = "t20";
     label = "Table Drain";
    }
:toggle{
     key = "t21";
     label = "Pits - Junction";
    }
}

:column{
    :toggle{
     key = "t22";
     label = "Pits - Surface inlet";
    }
    :toggle{
     key = "t23";
     label = "Pits - Lintels";
    }
    :toggle{
     key = "t24";
     label = "Pit Tag";
    }
//new toggles
    :toggle{
     key = "t100";
     label = "SW Pit Info";
    }
    :toggle{
     key = "t101";
     label = "SEW Pit Info";
    }
//
    :toggle{
     key = "t25";
     label = "Grateddrain";
}
    :toggle{
     key = "t26";
     label = "SW Existing";
    }
    :toggle{
     key = "t27";
     label = "SW Proposed";
}
   }
   :column{
    :toggle{
     key = "t28";
     label = "Batter Existing";
    }
    :toggle{
     key = "t29";
     label = "Batter Proposed";
    }
    :toggle{
     key = "t30";
     label = "Contour Existing";
    }
    :toggle{
     key = "t31";
     label = "Contour Proposed";
    }
    :toggle{
     key = "t32";
     label = "Contour BE";
}
    :toggle{
     key = "t33";
     label = "Spot Level Proposed";
    }
    :toggle{
     key = "t34";
     label = "Spot Level BE";
}
   }
   :column{
:toggle{
     key = "t35";
     label = "Kerb - K&&G";
    }
    :toggle{
     key = "t36";
     label = "Kerb - KO";
    }
    :toggle{
     key = "t37";
     label = "Kerb - IK";
    }
    :toggle{
     key = "t38";
     label = "Kerb - BK";
    }
    :toggle{
     key = "t39";
     label = "Kerb - RK";
    }
    :toggle{
     key = "t40";
     label = "Dish Gutter - DG";
    }
spacer_1;
   }
:column{
      fixed_height = true;
     fixed_width = true;
    :button{
     label = "ON ";
     key = "selall2";
     fixed_width = true;
     alignment = centered;
    }
    :button{
     label = "OFF";
     key = "selnone2";
     fixed_width = true;
     alignment = centered;
    }
   }
  }
  :boxed_row{
   label = "Existing Services                                                                        Proposed Services";
   :column{          
    :toggle{
     key = "t41";
     label = "EXSRV Electrical           ";
    }
    :toggle{
     key = "t42";
     label = "EXSRV Gas";
    }
    :toggle{
     key = "t43";
     label = "EXSRV Sewer";
    }
    :toggle{
     key = "t44";
     label = "EXSRV Telstra";
    }
    :toggle{
     key = "t45";
     label = "EXSRV Water";
    }
   }
   :column{
:toggle{
     key = "t46";
     label = "EXSRV Rising Main    ";
    }
    :toggle{
     key = "t47";
     label = "EXSRV Opt-Fibre";
    }
    :toggle{
     key = "t48";
     label = "EXSRV Optus";
    }
    :toggle{
     key = "t49";
     label = "EXSRV ERM";
    }
    :toggle{
     key = "t50";
     label = "EXSRV IRM";
}
   }
   :column{
    :toggle{
     key = "t51";
     label = "SRV Electrical                 ";
    }
    :toggle{
     key = "t52";
     label = "SRV Gas";
    }
    :toggle{
     key = "t53";
     label = "SRV Sewer";
    }
    :toggle{
     key = "t54";
     label = "SRV Telstra";
    }
    :toggle{
     key = "t55";
     label = "SRV Water";
    }
   }
   :column{
:toggle{
     key = "t56";
     label = "SRV Rising Main     ";
    }
    :toggle{
     key = "t57";
     label = "SRV Opt-Fibre";
    }
    :toggle{
     key = "t58";
     label = "SRV Optus";
    }
    :toggle{
     key = "t59";
     label = "SRV ERM";
    }
    :toggle{
     key = "t60";
     label = "SRV IRM";
    }
   }
:column{
     fixed_height = true;
    fixed_width = true;
    :button{
     label = "ON";
     key = "selall3";
     fixed_width = true;
     alignment = centered;
    }
    :button{
     label = "OFF";
     key = "selnone3";
     fixed_width = true;
     alignment = centered;
    }
   }
  }
  :row{
  :boxed_row{
   fixed_width = false;
   label = " Jointing ";
   :column{
    :toggle{
     key = "t61";
     label = "Joint - CJ";
    }
    :toggle{
     key = "t62";
     label = "Joint - DCJ";
    }
    :toggle{
     key = "t63";
     label = "Joint - DEJ";
    }
    :toggle{
     key = "t64";
     label = "Joint - DJ";
    }
spacer_1;
spacer_1;
   }
   :column{
    fixed_width = true;
     :toggle{
     key = "t65";
     label = "Joint - EJ      ";
    }
:toggle{
     key = "t66";
     label = "Joint - IJ";
    }
    :toggle{
     key = "t67";
     label = "Joint - SC";
    }
    :toggle{
     key = "t68";
     label = "Joint - TEJ";
    }
spacer_1;
spacer_1;
   }
:column{
     fixed_height = true;
    fixed_width = true;
    :button{
     label = "ON";
     key = "selall4";
     fixed_width = true;
     alignment = centered;
    }
    :button{
     label = "OFF";
     key = "selnone4";
     fixed_width = true;
     alignment = centered;
    }
   }
}
   :boxed_row{
    label = " General ";
   :column{
    :toggle{
     key = "t69";
     label = "Sheet Join Line";
    }
    :toggle{
     key = "t70";
     label = "";
    }
    :toggle{
     key = "t71";
     label = "";
    }
    :toggle{
     key = "t72";
     label = "";
    }
    :toggle{
     key = "t73";
     label = "";
    }
   }
   :column{
   }
:column{
   }
}
  }
  spacer_1;
  :toggle{
   key = "save";
   label = "Save Settings";
  }
 spacer_1;
  :image{
   key = "";
   width = 0;
   aspect_ratio = 1;
   COLOR = 7;
  }
  
  ok_cancel_help;
  
  :column{
   :paragraph{
    :text{
     key = "copyright";
     label = "";
     alignment = centered;
    }
   }
  }
  spacer_0;
 }
}

Link to comment
Share on other sites

you will just have to make the blocks your self.

 

also i must say that i had a little help here and there from people on this forum when writing this.

 

But if you need any help let me know - i should be able to help you.

 

Cheers guys

 

Ps. The lisp file was too large so i split it into 2 files - just paste the contents of LEGEND2.lsp into LEGEND1.lsp

LEGEND.LSP

LEGEND2.LSP

Link to comment
Share on other sites

How can I create dcl file?

I paste the code in txt then renamed to legend.dcl and but the lisp (after collecting the 2 parts) put there is an error message, The LEGEND.DCL file could not be loaded.

Link to comment
Share on other sites

thats correct so far - but you need to have the legend.dcl file located within one of your acad search paths - then it will work.

 

Cheers - let me know how you go

Link to comment
Share on other sites

  • 6 months later...
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...