Help with LSP code for a program

Started by AVCAD · 2007-07-12 17:33 UTC · 5 replies · SMF topic #13

I am really really new to  this OpenDCL stuff and i dont really understand the code at all.

I designed this UI for a program but i have no clue where to go with it.

what I want it to do seems simple enough...but doesnt it always?

Basically, Select a type of connector from a drop down...populate the list box per that selection...Select a Wall plate type from a drop down...1 gang plate...2 gang plate..etc...have the dwg image populate with the gang plate selection...and then based on the list box selection be able to click on the dwg preview to insert a block of that selection at the given location that you clicked...and have the dwg preview update...then when you hit Insert it will well insert what you had in the dwg preview...and the Delete Last button to beable to delete the last (or undo) the block you clicked to insert...

simple no? lol....

[attachment deleted by admin]
Hi Avcad,
Welcome to the club. :)
Are you on build RC2?
It looks like there's a bug, that doesn't allow you to copy the event code to the LSP file.
So I'm guessing thats why you had it blank...
I think Owen will get it fixed soon, then things will be a little clearer for you & then we can help you out more.
author=BazzaCAD link=topic=13.msg43#msg43 date=1184263141 wrote:
Hi Avcad,
Welcome to the club. :)
Are you on build RC2?
It looks like there's a bug, that doesn't allow you to copy the event code to the LSP file.
So I'm guessing thats why you had it blank...
I think Owen will get it fixed soon, then things will be a little clearer for you & then we can help you out more.



ya i am on rc2 i downloaded it, i think yesterday from the link here....ya i thought it was suppose to fill in the lsp code...
It is a situation particular to RC2.

You can highlight the code in the pane and copy it.
This will be rectified in RC3.

[attachment deleted by admin]
Avcad,
Can you check the contents of your Zip file please. .. the LSP appears to be empty.
author=AVCAD link=topic=13.msg42#msg42 date=1184261598 wrote:
I am really really new to  this OpenDCL stuff and i dont really understand the code at all.

I designed this UI for a program but i have no clue where to go with it.

what I want it to do seems simple enough...but doesnt it always?

Basically, Select a type of connector from a drop down...populate the list box per that selection...Select a Wall plate type from a drop down...1 gang plate...2 gang plate..etc...have the dwg image populate with the gang plate selection...and then based on the list box selection be able to click on the dwg preview to insert a block of that selection at the given location that you clicked...and have the dwg preview update...then when you hit Insert it will well insert what you had in the dwg preview...and the Delete Last button to beable to delete the last (or undo) the block you clicked to insert...

simple no? lol....


OK, RC3 is now fixed. Download it and give it a try. Highlight each event & copy it to your clipboard & paste it in your lisp. (Or go to Tools & set "Write to Lisp files")
Then do your coding in each event. Have a look at the help file "Hello World" & the Example folder to help you get started.
Then if you have any more specific question, we'll be happy to help you out. :)