PDA

View Full Version : More help please!



kieren
2004-12-08, 11:41 AM
Hi again guys!
Guess what - need some more help!
I am currently trying to write some steelwork detailing type stuff to suit British Standards steelwork profiles. I have most of them sorted now but have hit a couple of snags on my last 3 routines. If anyone could please help I would be much obliged, and will gladly post the finished code in this forum when completed (in the next few days hopefully, if I can get this stuff sorted!).

Files are ZIP attached.
PFC.lsp just doesn't want to load at all!
URSA.lsp loads ok but can't run the command URSAELEVS
SHS.lsp loads ok but can't run the command SHSELEV

I have also included the DCL file just in case its something to do with that.

Thanks in advance.

stig.madsen
2004-12-08, 01:01 PM
Kieren, that's quite a project. Can you post a couple of line samples from the structool.dat file?

kennet.sjoberg
2004-12-08, 02:12 PM
Hi Kieren

In file --pfc.lsp function (defun c: pfcplan..... cleaned rows 577 - 587 :



(end_list)
(action_tile "accept" (strcat "(progn (setq siz (atof (get_tile "selections")))" "(done_dialog)(setq userclick T))" ))
(action_tile "cancel" (strcat "(done_dialog)(setq userclick nil)" ))
(start_dialog)


In file --ursa.lsp function (defun c:ursaelevs..... cleaned rows 576 - 586 :



(end_list)
(action_tile "accept" (strcat "(progn (setq siz (atof (get_tile "selections")))" "(done_dialog)(setq userclick T))" ) )
(action_tile "cancel" "(done_dialog)(setq userclick nil)" )
(start_dialog)



In file --shs.lsp


I need "structool.dat" to help further


: ) Happy Computing !

kennet

kieren
2004-12-09, 09:46 AM
kennet,
Thanks for the responses!

Have modified the codes as your post, but I am still having trouble with the commands PFCPLAN and URSAELEVS.
PFC routine seems to load fine but PFCPLAN returns following error:
(rest of routine runs fine)

Command: pfcplan
***ERROR***bad argument type: stringp nil***
Command:

When loading URSA.lsp, again it appears to load fine but with following error on loadup:

Command: _appload --ursa.lsp successfully loaded.
Command: ; error: extra right paren on input
Command:
Again, rest of routine works fine but when issuing URSAELEVS the following error displays:

Command: ursaelevs
***ERROR***bad argument type: stringp nil***
Command:

I have attached the new lisps with your suggested mods applied.

Attached is the part of the .dat file that contains the info for the SHS sections.
I look forward to hearing from you shortly.
Many thanks again.

kennet.sjoberg
2004-12-09, 12:06 PM
Sorry Kieren, my bad . .
change:


(action_tile "accept" (strcat "(progn (setq siz (atof (get_tile "selections")))" "(done_dialog)(setq userclick T))" ))
to:
(action_tile "accept" (strcat "(progn (setq siz (atof (get_tile \42selections\42)))" "(done_dialog)(setq userclick T))" ))

And I still do need "structool.dat" to help, or at least a few rows of it !

: ) Happy Computing !

kennet

kieren
2004-12-09, 12:21 PM
Thanks kennet.
Have tried that change to code, but it makes no difference! Still getting same errors.
(.dat file attached for you)

Any more ideas??

Many thanks.

kennet.sjoberg
2004-12-09, 01:53 PM
Hi again Kiren,

first of all \42 == "
do not use them together
\42selections\42 == "selections"

and one extra ) in the end of program


: ) Happy Computing !

kennet

kieren
2004-12-09, 06:28 PM
Hi again kennet!
Still no joy with these routines.
I am absolutely sure I have modified the code as you have stated, but could I ask you to amend the files yourself and repost?
I know its being a bit cheeky, but I just cannot get them working whatever I do.
Many thanks again,

ps. Any luck with the SHS routine?

kennet.sjoberg
2004-12-09, 08:09 PM
Oooopps... Kieren, You will find the working files inside ReturnToSender.zip in my previous reply ; )

By the way, You can move the copy of the errorhandler, last in the file --shs.lsp
into --ursa.lsp that one is missing the errorhandler.

: ) Happy Computing !

kennet

kieren
2004-12-09, 09:35 PM
kennet,
Sorry about that - never thought to check those attached files! :Oops:

But still can't get SHSELEV to work:

Command: shselev
***ERROR***bad argument type: stringp nil***
Command:

I can't thank you enough for your help so far, but this is the last thing I am having trouble with. :banghead:
I would be so grateful if you could persevere with me to get this one working!

Many thanks in advance.

kennet.sjoberg
2004-12-09, 09:39 PM
...mmm funny, it works for me, I have to look deeper..

have You tried the commands ?
or just faced the error prompts from the copy of the errorhandler

: ) Happy Computing !

kennet

kieren
2004-12-09, 09:53 PM
Yes I have tried the commands.
There are no error reports when loading SHS.lsp.
The SHSPROF command works fine.
The SHSELEV command appears to work fine - the dialogue box loads ok and can select size I want to draw. But when I select the OK button I get the error

***ERROR***bad argument type: stringp nil***

displayed at the command line.
It may be coming from the .dcl file (attached) but I can't see anything wrong there!

kennet.sjoberg
2004-12-09, 10:04 PM
Great, put the file shs.dat in AutoCADs search path !
or write the absolute search path { line 543 } like :
(setq file (findfile "C:/Documents and Settings/kennet/Debug/shs.dat" ))

(findfile "shs.dat") probably fail, it is not the dcl -file.

: ) Happy Computing !

kennet

kieren
2004-12-09, 10:13 PM
kennet,
Found the problem - staring at me straight in the face!!

In the file you re-posted to me (shs.lsp) the routine was calling shs.dat but all the dat information for all the routines is kept in one file structool.dat - so it was calling from the wrong place all along!! :roll:

It now works fine.
Thanks for all your help, and for being so patient with me.
I will be including your name in the routines credits for all your help.

Many thanks again and best wishes.
Regards,

kennet.sjoberg
2004-12-09, 10:45 PM
Thank's, I'm glad to help !
I still need help myself sometimes, and this is a kind of repay
and believe me, in this tread You and me,
can get help from the very best ( when they shows up ).

And thats make me : ) Happy Computing !

kennet

stig.madsen
2004-12-10, 11:09 AM
Kieren, don't forget to check for picking empty lines in the list box - it'll also send you a "stringp nil" error.