Jump to content

Recommended Posts

Posted

Hi Lee,

 

the Lisp used to work fine for me but recently i started getting this error  "Sample not found in first column of CSV file." 

 

I am using Civil 3d 2019.

 

thanks in advance.

 

Posted

I assume you read through the comments on the last page and none of them worked? (just checking with a silly question)

Posted

Yes tried everything ... but still getting that same error 

Posted

Does your CSV file use a different delimiter to that used by your system regional settings? Try opening the CSV file in a plain text editor (such as Windows Notepad), and replacing the commas with semi-colons.

  • Like 1
  • 5 months later...
Posted

Hi Lee,

I'm having the exact same issue as a user has mentioned above - "{drawingname} not found in first column of CSV file." 

This has begun occurring out of nowhere, across all of the dirctories that this lisp is utilized.
I've tried updating the the latest version of your UTB .lisp with no difference.
I dont have other add ons and this has begun occurring out of nowhere.

Error code details below;

 

; error: bad argument type: stringp nil
:: UpdateTitleblock.lsp | Version 1.9 | © Lee Mac 2020 www.lee-mac.com ::
:: Type "utb" to run manually ::
715-EL-MCC-0004_7 not found in first column of CSV file.

Checking the .csv file reveals that that drawing name is definitely in the first column, I've tried with and without the .dwg extension - no difference.
The .csv works exactly the same as before, with commas and not semi-colons.

Any ideas on what i can try next ?


Kind regards,

Chris

Posted

Are you testing using the program exactly as it appears on my site, or have you modified it at all? I ask because you should not be receiving this error message:

; error: bad argument type: stringp nil

 

  • Like 1
Posted
14 hours ago, Lee Mac said:

Are you testing using the program exactly as it appears on my site, or have you modified it at all? I ask because you should not be receiving this error message:


; error: bad argument type: stringp nil

 


Exactly as appears on site, i've tried again without any csv filename designated also with the same result.

Posted

Thanks Chris - it looks like the debug program has run successfully (reporting "All attributes are up-to-date.") - are you sure you're testing the main program exactly as it appears on my site, as I'm perplexed as to why the debug program ran successfully when it is merely printing additional messages to the command line.

  • Like 1
Posted

Lee, awesome - I think we're close.
When using the debug and manually denoting the csv file location as prompted it discovers the correct one.
But when I specify in the .lisp routine to search the same directory as the drawing for a titleblockdata.csv - It discovers an incorrect csv file that is in a different directory ( but has been previously utilized ).

Can you think of a reason that the .lisp routine might bypass the .csv file that is in the 'same as drawing' directory and instead utilize one from a different folder ?
UTB_Debug.lsp
Attaching the .lisp with the updated csv path for reference, as well as the new debug code ( showing that it's picking up a different .csv than before )

UTB_DEBUG_Discovering wrong csv.txt

Posted
12 hours ago, Chris Dougall said:

When using the debug and manually denoting the csv file location as prompted it discovers the correct one.
But when I specify in the .lisp routine to search the same directory as the drawing for a titleblockdata.csv - It discovers an incorrect csv file that is in a different directory ( but has been previously utilized ). Can you think of a reason that the .lisp routine might bypass the .csv file that is in the 'same as drawing' directory and instead utilize one from a different folder?

 

What is returned when you enter the following at the command line?

(findfile "TITLEBLOCKDATA.csv")

Does the erroneous file reside in an AutoCAD Support Path?

  • Like 1
Posted

Lee, based on the findfile command you gave and comparing to support filepaths we've worked it out.
It was a support path pointing to a OneDrive mydocuments directory, that within subfolders had another "titleblockdata.csv".
My company rolled IT updates on our machines without me knowing and it added this onedrive support file path.

Thanks very much for your help on this, you're a champion.

Love your work.

Kind regards,

Posted

You're most welcome Chris - I'm glad you were able to pinpoint the issue!

 

  • Like 1
  • 3 months later...
Posted

Hi,

Is Update Titleblock Attributes possibly available as .scr, NOT lisp?

Is it possible to have Update Titleblock Attributes as script that would update tags from .csv file from folder where drawings or .csv files live, without any prompts?

I would like to run this script on another program, to change plenty of tags on multiple drawings, that I manage via excel spreadsheet.

Lee, I think lots of your fans would also like such option.

Regards,

Will

 

 

Posted (edited)
7 hours ago, Will_123 said:

Is Update Titleblock Attributes possibly available as .scr, NOT lisp?

Is it possible to have Update Titleblock Attributes as script that would update tags from .csv file from folder where drawings or .csv files live, without any prompts?

I would like to run this script on another program, to change plenty of tags on multiple drawings, that I manage via excel spreadsheet.

Lee, I think lots of your fans would also like such option.

 

This is already possible with the current version of the application - simply configure the utb:csv parameter (line 126) to point to the CSV file from which attribute values should be sourced (this may reside at an absolute or relative filepath, or within the working directory of the drawings being modified), and then load & run the program across multiple drawings using a basic AutoCAD Script configured to open each drawing, load & run the UTB program, and then save & close the drawing - you could even use my Script Writer application to generate & run such a script automatically.

Edited by Lee Mac
  • 2 years later...
Posted

Hello! First off, thank you Lee for creating the lisps. You are truly a hero.

Not to mention, the instructions are generally easy to follow as well for a noob like me.

 

Anyhow- I am currently working on a project where I have to update the attributes of ~200 drawings. I tried to use the latest version of the UpdateTitleblock lisp, and it seems to run just fine, but it doesn't update my attributes. The command line, though, says that "Attributes are up to date".

 

In this case, I'm not too sure why it's not working. Everything else seems to be set up fine.

 

Does anyone know why this might be happening?

 

I am using ACAD LT 2024.

The only other available ACAD software that I can probably download here at work is ACAD Map 3D 2024.

 

Thanks in advance to anyone who responds!

  • 3 months later...
Posted

Hello Lee! I have the same issue as LISPnoob, the command says Attributes are up to date but nothing is updated, I am using the model from your web and nothing has been changed. 

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