Message 1 of 13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a csv attach, import csv and place the text along to the polyline using offset and distance.
Solved! Go to Solution.
I have a csv attach, import csv and place the text along to the polyline using offset and distance.
Solved! Go to Solution.
Please try the attached. I have tested and it works but haven't had time to check thoroughly.
It checks and creates layer "TEXT", colour 1 (red) and sets a text height for the text of 2.0. This can be changed within the lisp (variable ht).
I am not one of the robots you're looking for
dlanorh,
Thanks for the lisp, I tested it on several files. It's working properly.
Please make some additional changes as shown in the line below
1) The text justification should be at the middle center.
2) There should be points on the text.
3) Sometimes it happens that if the polyline starts with an odd chainage, then put the chainage manually. Whenever there is no data input, set it to the default starting chainage 0.
I am not one of the robots you're looking for
Attached is updated lisp that addresses 1 and 2. I will sort 3 (if possible) when I understand what is required.
I am not one of the robots you're looking for
Please see attached drawing, you will understand, and this time Lisp is showing the error.
An Error : bad argument type: 2D/3D point: nil occurred.
I am not one of the robots you're looking for
OK. The error is occurring because some of the data in test2.csv have chainage values beyond the end of the polyline.
The start chainage is 360000.0
The polyline is 10068.0 long, so any chainage greater than 370068.0 is causing the routine to error. What do you want it to do in this scenario?
Attached is the updated lisp to enable a start chanage to be entered. The lisp currently ignores any data past the end of the polyline.
I am not one of the robots you're looking for
dlanorh,
sorry I did not verify that the length of the polyline is less than the length of the CSV. This is the reason why this error is saying. Please show this error when the polyline length is short., "Please check the length of the polyline".
Thank you for adding new features "Enter staring chainage", Please this feature can also be added to PTR.lsp lisp.
Attached are the Lisp and an example "Error" file. I've given the error file the extension "*.err" and it is placed in the same directory as the "*.csv" file that is loaded. The file lists the start chainage, polyline length and the end chainage. There is then a message that the following items are "out of range". It then lists the lines from the csv file that it couldn't process. I hope this is OK. This was the easiest and neatest way of doing things, as it allows you to :
1. Remove the "header" information.
2. Change the file extension to "*.csv"
and have a csv file ready to go for the next section.
I have added the option to select a text height. There is a default height of 2.0, and just pressing return will accept this.
If there are Items in the csv file it cannot process (re: above) an alert box pops up telling you how many items could not be processed and the full path and file name.
I will try to sort PTR to include a start chainage tomorrow.
I am not one of the robots you're looking for
My imagination is even better. I will not even need to create separately CSV .
Thanks a lot.
Sir,
The lisp isn't working for the attached csv file.
Could you please modify the lisp as per the csv attached.
Layers should be
1-Points and Sl.no. in "points" layer.
2-Codes in "Code" Layer
3-Z value in "Elevation Layer"
Regards
Sir,
The lisp isn't working for the attached csv file.
Could you please modify the lisp as per the csv attached.
Layers should be
1-Points and Sl.no. in "points" layer.
2-Codes in "Code" Layer
3-Z value in "Elevation Layer"
Regards