Import CSV and create point group automatically

Import CSV and create point group automatically

RickfromtheNorth
Advocate Advocate
1,765 Views
5 Replies
Message 1 of 6

Import CSV and create point group automatically

RickfromtheNorth
Advocate
Advocate

Hi, I'm sure this exists somewhere. Looking for a lisp to run to import a csv and automatically place it into a point group with the same name as the csv file name. Anybody know of something. Also would be nice If you could also select multiple csv files and create multiple point groups at the same time.

Thanks

0 Likes
1,766 Views
5 Replies
Replies (5)
Message 2 of 6

hosneyalaa
Advisor
Advisor
0 Likes
Message 3 of 6

Jeff_M
Consultant
Consultant

I believe this can be done in lisp:

http://docs.autodesk.com/CIV3D/2012/ENU/API_Reference_Guide/com/AeccXLandLib__IAeccPoints__ImportPoi...

 

The Autocad Lisp Customization forum has a number of posts about getting files to use in a loop. 

 

I don't have time right now to provide any code, sorry. That may change in the next few days.

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 4 of 6

RickfromtheNorth
Advocate
Advocate

No worries, I'm not in a rush. I would prefer Lisp over .NET code but would work. If you could direct me to some code in the near future that would be great. thx

0 Likes
Message 5 of 6

Jeff_M
Consultant
Consultant

See my reply in this thread for importing the points. In the import options you can specify the PointGroup to add the points to. 

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 6 of 6

JanardFugro
Contributor
Contributor

Hi Jeff_M,

 

I am not an expert in autlosp programing, can you give some code example to add cogo points to a pointgroup  while importing from csv file. It would be greatly appreciated if you could.

 

Thank you

0 Likes