+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Full Member
    Using
    AutoCAD 2012
    Join Date
    Feb 2009
    Posts
    32

    Default strange result with DCL external values from multiple txt files

    Registered forum members do not see this ad.

    I know how to do this and have done it. BUT.
    I have multiple products.ini, products2.ini files where i get the values for popup_list.

    The first selected is ok. However when i change to the external ini file to the next ini file. The content of the popup_list is still the one i have used at first.

    I cant post the whole lisp nor DCL but has someone experienced this before and how can i "flush" the old external ini values?

    Thanks.

  2. #2
    Super Member rlx's Avatar
    Computer Details
    rlx's Computer Details
    Operating System:
    W10
    Computer:
    i74ghz/ssd500/2tbhdd
    Discipline
    Electrical
    rlx's Discipline Details
    Occupation
    electrical designer dragon
    Discipline
    Electrical
    Details
    I dont excel in anything but I rearly give up
    Using
    AutoCAD 2012
    Join Date
    Nov 2014
    Location
    Bergen op Zoom , Netherlands
    Posts
    599

    Default

    Quote Originally Posted by Apache2k View Post
    I know how to do this and have done it. BUT.
    I have multiple products.ini, products2.ini files where i get the values for popup_list.

    The first selected is ok. However when i change to the external ini file to the next ini file. The content of the popup_list is still the one i have used at first.

    I cant post the whole lisp nor DCL but has someone experienced this before and how can i "flush" the old external ini values?

    Thanks.
    Make shure you refresh your dialog each time you start it. When loading your ini , first set the old ini's to nil. I suppose you use a list to fill your popup list , so upon load , first set this list to nil also. Try to make a function to reset all viariables and lists whenever you load a new ini. And last but not least , have a critical look that variable are declared properly , global / local.

    gr. Rlx

  3. #3
    Full Member
    Using
    AutoCAD 2012
    Join Date
    Feb 2009
    Posts
    32

    Default

    Thanks for the quick reply.
    I did reset the values. It is there. Its one function doing all of it and idid use (setq prod nil)
    Still no luck. Im turning blue

    Is there a reset for the internal lists or something similar in lisp?

  4. #4
    Super Member rlx's Avatar
    Computer Details
    rlx's Computer Details
    Operating System:
    W10
    Computer:
    i74ghz/ssd500/2tbhdd
    Discipline
    Electrical
    rlx's Discipline Details
    Occupation
    electrical designer dragon
    Discipline
    Electrical
    Details
    I dont excel in anything but I rearly give up
    Using
    AutoCAD 2012
    Join Date
    Nov 2014
    Location
    Bergen op Zoom , Netherlands
    Posts
    599

    Default

    Quote Originally Posted by Apache2k View Post
    Thanks for the quick reply.
    I did reset the values. It is there. Its one function doing all of it and idid use (setq prod nil)
    Still no luck. Im turning blue

    Is there a reset for the internal lists or something similar in lisp?
    I have posted serverall dcl related routines on this forum , just search for rlx and maybe you find something of use. My personal experience for this kind of errors , which I frequently have my self , is what I call sloppy programming , I start out with a good strategy , but then I change something and forget or fail to see the impact on other parts. Use breakpoints in your editor and check each step. If for example you have a routine to fill your popup list and have declared this list local , then trying to change it in another part of your program will have no effect. Unless your pc is bewitched and you can blame your wife or girlfriend (usually the case) , there must be a logical error in your program/ thinking. You could go old school and make a special variable dump routine that prints your variables at certain points in your app , thus confirming each step. But if its any comfort , I know exacly how frustrated it can be when a bug is eating your brain ;-). If nothing helps , post or mail the part that's bugs you.

    Gr.Rlx

  5. #5
    Full Member
    Using
    AutoCAD 2012
    Join Date
    Feb 2009
    Posts
    32

    Default

    Thanks Rlx
    Its what i did try to avoid, so lets split it in to parts and check
    Ill inform the result.

  6. #6
    Senior Member
    Discipline
    Civil
    Hippe013's Discipline Details
    Occupation
    Survey Crew Chief / Civil Designer
    Discipline
    Civil
    Details
    Land Survey / Civil Engineering
    Using
    Civil 3D 2017
    Join Date
    Feb 2010
    Location
    North Dakota
    Posts
    374

    Default

    How are you opening and reading your .ini files?

  7. #7
    Full Member
    Using
    AutoCAD 2012
    Join Date
    Feb 2009
    Posts
    32

    Default

    Like this:

    (setq produfile (findfile ininame1))

    (open produfile "r")

  8. #8
    Senior Member
    Discipline
    Civil
    Hippe013's Discipline Details
    Occupation
    Survey Crew Chief / Civil Designer
    Discipline
    Civil
    Details
    Land Survey / Civil Engineering
    Using
    Civil 3D 2017
    Join Date
    Feb 2010
    Location
    North Dakota
    Posts
    374

    Default

    Are you then closing it with the following?

    Code:
    (close produfile)

  9. #9
    Full Member
    Using
    AutoCAD 2012
    Join Date
    Feb 2009
    Posts
    32

    Default

    Yes Its closed. Forgot to mention. I hate bugs found so many bugs but none of them fixed this issue. Still fixing/searching.

  10. #10
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2015
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,053

    Default

    Registered forum members do not see this ad.

    Hi,
    The action_tile that selects the file should have the codes to retrieve the contents of the new selected file then the variable that holds the strings must be set to nil prior appending strings to it.

Similar Threads

  1. Using multiple external data tables.
    By Don Mitchell in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 21st Nov 2014, 08:31 pm
  2. multiple external polygon offset
    By ctdlc888 in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 25th Aug 2012, 01:43 pm
  3. Replies: 6
    Last Post: 20th Sep 2011, 07:39 am
  4. Layers and external reference files
    By Nardino in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 2
    Last Post: 30th Jun 2010, 03:18 pm
  5. Links to external files
    By Vinnt1974 in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 3rd Mar 2004, 02:59 pm

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts