Jump to content

Recommended Posts

Posted

Hi guys,

 

I'm having some issues with some code i'm writing.

 

i'll start off by giving you a idea of what i'm trying to do first:-

 

The engineering firm i work for would like to have a 'check box legend' for our drawings.

for example, we would like to have check boxes that you can select, that intern, depicts what is shown in our legends and what is not.

 

eg. if you want to show an electrical service line in your legend, all you have to do is tick the box and it automatically inserts it into the legend on that specific page.

 

okay so i've started writing this code (see attached) when i implement it into ACAD i get 3 errors in this order.

 

1: error in dialog file 'C:\users\bladest\desktop\project\LEGEND.dcl' at end-of-file: premature end of file.

 

2: error in dialog file 'C:\users\bladest\desktop\project\LEGEND.dcl' at end-of-file: syntax error symbol "spacer_0"

 

3: the LEGEND.dcl file could not be loaded!

 

any ideas guys? this one has got me stumped. the attached .dcl and .lsp files are what i'm using.

 

Cheers guys!

LEGEND.dcl

LEGEND.LSP

Posted

Hi Fixo,

 

Thankyou for your quick response.

 

i am still getting the same 3 errors.

 

1: error in dialog file 'C:\users\bladest\desktop\project\LEGEND.dcl' at end-of-file: premature end of file.

 

2: error in dialog file 'C:\users\bladest\desktop\project\LEGEND.dcl' at end-of-file: syntax error symbol "spacer_0"

 

3: the LEGEND.dcl file could not be loaded!

 

i have tried moving the file locations to my support file location on my C:\ but still no good.

 

what is my next option?

 

Regards,

Posted

Sorry have not tested dcl with lisp,

I will try it later

After the quick glance this dialog loaded and works correct on my end

I'm using A2010 btw, but the problem is with blocks, i could not use them

See command line feedback

Command:

SPECIFY TOP LEFT CORNER OF LEGEND INSERTION POINT:

"t0.dwg": Can't find file in search path:

C:\Users\Олег\Programming\Lisp\AASNIPPETS\DCL\ (current directory)

C:\Program Files\AutoCAD 2009\Support\

C:\Users\Олег\AppData\Roaming\Autodesk\AutoCAD 2009\R17.2\enu\support\

C:\Program Files\AutoCAD 2009\help\

C:\Program Files\AutoCAD 2009\Express\

C:\Program Files\AutoCAD 2009\support\color\

C:\Program Files\INCDEC\

C:\Program Files\AutoCAD 2009\Support\Progs\

C:\Program Files\AutoCAD 2009\Support\Progs\Tools\

C:\Program Files\AutoCAD 2009\Support\Progs\Icons\

C:\Users\Олег\Programming\FORUMS\Augi\WeldBlocks\

C:\Program Files\AutoCAD 2009\drv\

C:\program files\autocad 2009\drv\

C:\Program Files\AutoCAD 2009\

*Invalid*

 

Another possible issue would be solved with

saveing DCL in UTF-8 encoding, if you're working

in Acad > 2010 release, create copy in UTF-8, then

temporarilly move your current DCL from working folder

and try lisp again with UTF-8 copy

Posted

Found Error Check This Bladezy

Missing ,Curly Bracket end of line

 

Hint : 1: error in dialog file 'C:\users\bladest\desktop\project\LEGEND.dcl' at end-of-file: premature end of file.

 

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;
    }
   }
  }
[color="red"]  }
  spacer_0 ;}[/color]
 

Posted

awesome! thanks guys it is running smoothly now :)

I will try with the blocks inserts and see if there are anymore issues.

 

Regards,

Posted
I'm having some issues with some code i'm writing.

 

 

okay so i've started writing this code (see attached)

 

Looks like the code has been taken from here. :huh:

Posted
Looks like the code has been taken from here. :huh:

 

Yes. It looks like the OP initially tried to use (bump) that thread to ask if he could ask a question of the author (here). Don't know why it wasn't cited here.

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...