Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parametrically define 24 cylinders for 36 3D graphic information displays 2

Status
Not open for further replies.

racookpe1978

Nuclear
Feb 1, 2007
5,968
0
36
US
I am a modest AuoCAD user, certainly not a pro nor a draftsman. I have used a former company's AutoCAD-based program and programming menu's to build parametric 3D objects, but that used the former company's proprietary software - which is no longer available.

Purpose: I need to illustrate the properties of light and the atmosphere, water and ice albedo's and solar elevation angles, energy transmitted and energy reflected for various days-of-the-year, at every hour of the day, for various latitudes. Got the data, know the solar elevation equations, have the data in spreadsheets. Near the north and south poles, the sun is above the horizon at various angles and elevations for up to 24 hours, and my data needs to be plotted for each hour (every 15 degrees around a circle with +x = north.) Or due south for Antarctica.
I'm plotting 24 cylinders for each of 36 different plots: 1 cylinder for each hour, each cylinder dia = an optical property or numeric value for that hour (percent of light transmitted for example) and the length equal to another property (thickness of atmosphere, amount of energy transmitted, albedo of water, or whatever.)

Origin of the cylinders is at 0,0,0 +z is "up" (towards the Polar Star), +x is midnight = 0.0 degrees, 1:00 am = -15 degrees HRA hour angle, etc. Solar elevation angle = SEA = in degrees up from the horizon.

By hand, I use the following sequence of commands - but I need to know how to use AutoCAD 2010 "regular" macro process to avoid doing it for every cylinder in every plot:
CYL <cr> [starts CYL command sequence]
0,0,0 <cr> [sets first point of the CYL]
D <cr> [for Diameter option]
(user enters diameter value)<cr>
A<cr> [set Axis endpoint option]
user enters length<-hour angle<SEA <cr>
Then repeat for the next Dia, length, hour angle, and solar elevation angle

I think it will be too complicated to try to automate everything right from Excel, but repeating every step every time isn't working either.

What is a better way?
 
Replies continue below

Recommended for you

You could create all the needed commands in a single Excel column, select the range of commands, then post them into Autocad's command line.

The length/angle input can be created with Excel's concatenate function.
 
Or export the sequence of commands generated in Excel to a script (text file with a filename representative of the variables being illustrated and with extension "*.scr" ).
Then you make a library of scripts that can be run with a single command on the command line. Surprise, it's SCRIPT. Pops a dialog box to select the one you want.

I could also suggest that there's a way to calculate anything with LISP but I'm weak in that area. I do know that if I needed to do it, I could figure it out and it would take about an hour to get it running nicely. I have a LISP library that I've accumulated over the past 15 years and your problem is exactly like the others I've got. In fact, there may already be a LISP script written for your problem!

STF
 
Status
Not open for further replies.
Back
Top