×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Parametrically define 24 cylinders for 36 3D graphic information displays2

Parametrically define 24 cylinders for 36 3D graphic information displays

(OP)
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?

RE: Parametrically define 24 cylinders for 36 3D graphic information displays

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.

RE: Parametrically define 24 cylinders for 36 3D graphic information displays

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!