Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Script File Help.............

11 REPLIES 11
Reply
Message 1 of 12
Anonymous
554 Views, 11 Replies

Script File Help.............

Hello:

 

   I have been tasked with trying to create some type of template (or multiple templates, if needed) to convert my coordinates (some having straight lines and some having arcs) into a script file. I will be gathering the coordinates from an excel file then linking them to my script file.

 

  My problem is, I have hundreds of sets of coordinates (all with varying arcs and straight lines and varying order in which arcs and lines are used) in which I'm trying to establish a method to convert to a script file. Also, the total number of lines (arcs and straight) vary. Some have as little as 10 lines and some contain as many as 20 lines total.

 

   I have succesfully created a script file using one set of coordinates but can't imagine doing this hundreds of times over.

 

   I have attached a PDF file showing an example of the coordinates along with the radii (in some cases there is no radius, therefore must be a straight line) and just need some ideas of how I can accomplish this without creating a script file for each and every set of coordinates I have. The example I have is only a small portion of what I am working with.

 

   Any ideas or suggestions of how I can accomplish this would be greatly appreciated. Thanks in advance for your help!

 

Sincerely,

 

Ryan

  

11 REPLIES 11
Message 2 of 12
rkmcswain
in reply to: Anonymous

You might want to ask in the customization group also.

R.K. McSwain     | CADpanacea | on twitter
Message 3 of 12
Anonymous
in reply to: Anonymous

Create text string in Excel similar to this. (this creates text from column A at specific XY locations)

 

Script-excel.JPG

 

Copy column into new worksheet PASTE SPECIAL - Values

 

Saveas .txt file

 

Open in notepad find/replace quotation marks with nothing (remove " ")

 

save file and rename .scr

 

drag into AutoCAD

 

Hope this helps.

 

JK

Message 4 of 12
Anonymous
in reply to: Anonymous

How would I apply a radius to the coordinates when needed? And does this just plot the coordinates or actually draw the line as well?

 

Thanks, very insightful so far!

Message 5 of 12
Anonymous
in reply to: Anonymous

Works with any command, just as if you were typing at the commandline.

 

remember spaces are enter.

 

JK

Message 6 of 12
Anonymous
in reply to: Anonymous

So do I need to enter the command (pline, line) at the beginning of the script file?

 

I'm very new at this and don't quite understand where some of the values "-mtext, 15, 0, 1" came from.

 

Any chance you would be willing to use the coordinates I supplied and show me how my coordinates and radii should be entered into Excel, then transposed to the SCR file to actually make this draw my blade in AutoCAD?

 

I know this is asking a lot, but if I can get one example, I am confident I could complete the rest. Thank you for your patience with my lack of understanding.

 

Ryan

Message 7 of 12
Anonymous
in reply to: Anonymous

See attached.

 

Arc.JPG

 

Arc2.JPG

Message 8 of 12
Anonymous
in reply to: Anonymous

Look at attachments. I have included my SCR file, an excel coordinate and a PDF file of what it should look like. I apologize but I am thoroughly confused at this point of how I can get the information from excel to a scr file to draw the object shown.

 

Any thoughts?????

 

Thanks

Message 9 of 12
Anonymous
in reply to: Anonymous

In creating my original script file I had to input several commands such as pline, line and arc. Not sure how to simplify this in Excel.

You have definitely shed some light on what I'm trying to accomplish, just need a little more project/object specific information.

Maybe it's just that I don't get it! I really appreciate your assistance and patience. Thanks
Message 10 of 12
Patchy
in reply to: Anonymous

I don't think it can be possible. I drew lines using the coordinates and how can you have arc that would fit using the given radius.

(See the drawing where the red line is)

Message 11 of 12
Anonymous
in reply to: Patchy

This may help get you started. You'll have to figure out all the coordinates and radii for each.

 

Example2.JPG

Tags (1)
Message 12 of 12
Anonymous
in reply to: Anonymous

forgot .xlsx

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost