I am needing to have an autolisp script written relatively quickly but have no programming experience. I am looking for anyone who is interested to give me a quote to write the program. Hopefully this is appropriate for this site...if not please tell me where I can find help. Below is a description of the requirements of the autolisp program.
I am in need of an AutoLisp program that will do the following.
Read
Read a .csv file with the following information
1. A filename to be matched to a cad drawing block located in a separate folder
2. A unique identifier, because many of the filenames will be repeated
(the output of the unique identifier is a little strange, it basically takes the block name and adds a number on the end of it. If this is a convention that is goofy to deal with, I can manipulate the .csv to simply have an index number for each separate block)
3. Values from a 4x4 transformation matrix. The values for x, y, z, position and x, y, z, rotation will be read from this 4x4 matrix.
(the original output of the matrix is in transformation matrix form as shown in the attached picture, therefore the degree/radian measures for each axis would have to be backed out. This information can also be manipulated in excel to output the radian/degree measures of the rotations if needed.)
Import
The lisp program will then need to use this information to import a cad drawing block into an open project and place the drawing block in the appropriate x, y, z location as well as in the proper orientation as per the rotation values. I am aware that the import function in Autocad allows for a z rotation of a block upon import, but I don’t know how to handle the other axes.
(the cad block name will match the file name from the .csv. The cad drawing blocks will be preconfigured and located in a drawing folder in an unspecified location)
That is basically the gist of it. Below is the current output from the .csv file. This can be different if needed…it would simply add a secondary step to the process.
.csv output
back_joist_assem_wood_rail_left,back_joist_assem_wood_rail_left,0.1558391847,-0.9839298883,0.0871557427,29.3547489634,0.9851181838,0.1483365821,-0.0868240888,63.1224327486,0.072500431,0.0993893022,0.9924038765,-1.0672036235,0,0,0,1.
back_joist_assem_wood_rail_left2,back_joist_assem_wood_rail_left,0.1558391847,-0.9839298883,0.0871557427,26.8987687033,0.9851181838,0.1483365821,-0.0868240888,63.4875881062,0.072500431,0.0993893022,0.9924038765,-0.8282252928,0,0,0,1.
back_joist_assem_wood_rail_bl,back_joist_assem_wood_rail_bl,0.1558391847,-0.9839298883,0.0871557427,24.4427162496,0.9851181838,0.1483365821,-0.0868240888,63.8525094444,0.072500431,0.0993893022,0.9924038765,-0.5913037755,0,0,0,1.
right_joist_assem_wood_rail_front,right_joist_assem_wood_rail_front,0.1558391847,-0.9839298883,0.0871557427,32.3356782193,0.9851181838,0.1483365821,-0.0868240888,65.3137719209,0.072500431,0.0993893022,0.9924038765,-1.1253865051,0,0,0,1.
right_joist_assem_wood_rail_front2,right_joist_assem_wood_rail_front,0.1558391847,-0.9839298883,0.0871557427,32.7329625872,0.9851181838,0.1483365821,-0.0868240888,67.7700012911,0.072500431,0.0993893022,0.9924038765,-0.9453849536,0,0,0,1.
Here are the descriptions of the data,
1st Unique id for the object file, This is simply the filename of the file that was exported with an indexer dumped on the end. Used for unique identification of repeated instances. If this is a pain I can also index each object in the csv
2nd filename of the exported object with the extension stripped. This would be used to match to the .dwg block to be inserted.
3rd Rotation matrix. The rest of the values are the A1, A2, A3, A4, B1, B2, B3, B4, C1, C2, C3, C4, D1, D2, D3, D4 values in a the 4x4 rotation matrix shown in the attached .jpg. Once again, I have a fair amount of latitude with the output of the .csv so the conversion of the x, y, and z, rotation angles can be done and output in the .csv…it will just require a secondary step.