Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Color assignment by object type 5

Status
Not open for further replies.

blades741

Mechanical
Aug 1, 2012
47
0
0
US
Is it possible to assign a color to an object type? More specifically, I want to assign RED (for example) to SPLINES, and I want it done automatically (globally). The reason for this is simple: when we export sheet metal flat-patterns out of an Inventor drawing, we import it into AutoCAD for clean-up, which includes replacing all SPLINES with other geometry (our laser doesn't like splines). I want to incorporate this into a template, so when a DXF file is opened, the splines will automatically show up in RED. Currently, we select all and change it in the Properties dialogue box. This works ok, but I'd like to automate this if possible.
Thanks!
- Bill
 
Replies continue below

Recommended for you

Yes... just make sure that you plot by line weight, and, not colour or assign your colours to an appropriate line weight.

Dik
 
The whole point is, I want ALL splines to be modified, and I want them to initially open the DXF file with the splines a specific color. It's not as simple as creating a layer.
 
RobyengIT said:
This doesn't have anything to do with plotting, it's strictly a geometry type issue.

You can make them any colour you like... often CAD programs use different colours for different line widths. Just check...

Dik
 
I didn't realize my original post was so difficult to understand. This has nothing to do with line widths or linetypes.

"I want to incorporate this into a template, so when a DXF file is opened, the splines will automatically show up in RED"
 
When exporting flat patterns from Inventor to DWG, there is ability from Flat Pattern DWG Export Options -> Geometry tab to replace Splines into other geometry.
In that way you will get the clear flat pattern without any Splines.
 
I believe TerryScan is correct on this, in that it would require a custom routine. I just don't see how it would be possible any other way.
Maripali: Interestingly, I did stumble onto this yesterday. I had always exported from the Inventor drawing, but I did find the setting you mentioned at the model (Flat Pattern) level. Unfortunately, I don't think this is an option for us, as replacing splines with short line segments would essentially create a speed-bump for our old lasers.
 
Dear Blades741,

Flat Pattern DWG Export Options appears only on saving Flat Pattern as DWG.
There after generated Flat Pattern you should see the icon of the Flat Pattern at the bottom of the Sheet part Browser Bar.
With the right mouse button click on that icon drop menu opens with Save As... command.
Before saving select DWG format and change file name according to your requirements and save.
Immediately opens Flat Pattern DWG Export Options dialog box where you able to make some changes to the DWG file format and options.

If you tick on Replace Splines and Merge Profiles to Polyline, all spline curves will be converted to Polylines.
Still no had problems with any laser or waterjet no matter how old are them.
 
Blades,
How are the parts originally modeled - in Autocad or Inventor?
If they start their life in AutoCAD then a few changes to the workflow of your designers might save you these headaches.
If you are making parts in Inventor, flattening them, and then exporting the pattern, then I've noticed a few things that help avoid getting splines in the DXF.
Primarily, keep fillets and corner radii from overlapping bend radii. This isn't always possible, but sometimes it can be a trivial change to the part to fix the overlap by changing the size of the radius or shifting the point of intersection slightly. If you use cuts, then radii on the cuts can also cause a spline if the cut intersects the part at an angle other than perpendicular. This would happen if the cut is placed on a face, but part of the cut extends over a bend (when the designer's intent is for the cut to have been done before bending, but places the cut feature after the bend features. Again, a workflow issue.

STF
 
You can select all SPlines and change their color or layer using the keyboard. Once you have mastered this manually, create a short LISP routine that uses the same commands. Then you have to make it execute when AutoCAD opens a drawing, again should be easy.
 
Thank you guys, I appreciate the input! Currently, our models are done in Inventor, then the DXF files are processed or "cleaned-up" in AutoCAD. Splines don't occur terribly often, but as you mentioned SparWeb, it's when a bend crosses a radii. I am not particularly fond of replacing a spline with short line segments, and I usually just delete it and replace it with a clean radii in the flat-pattern. On the occasions when I design parts, I always strive to avoid this scenario. Unfortunately, It's a case of many designers, few draftsmen.

Our current workflow is as you mentioned IFRs, done manually on the keyboard (select all, then select any splines from the Properties dialog box, and change color).

To be honest, I want this functionality for a small handful of others in our group who abhor any sort of change, and wouldn't employ any sort of LISP routine if it had to be launched manually. Worst case of "but we've always done it this way" I've ever encountered in my 40 year career. Small town in rural Indiana.
 
Yes, that's exactly how it's handled now.

Our current workflow is as you mentioned IFRs, done manually on the keyboard (select all, then select any splines from the Properties dialog box, and change color).
 
I meant editing the DXF file outside of AutoCAD (it is a pure ASCII text file and easily decoded), probably not in the cards this time...
 
It could be helpful, to motivate the "many designers" to act more like the "few draughtsmen", if you could make sure that all calls from the shop when the DXF won't convert are routed to THEM not you.
Pipe dream?
I have similar problems.

There's something I'd like to clarify, about the colors. It may be a red-herring that's been leading your other respondents in multiple directions.
If your stated problem is the presence of SPLINES in a DXF flat pattern which should instead be a closed POLYLINE, then what's the color for?
At the moment you have the DXF open in AutoCAD, and have the lines selected, and have filtered the selection to include only splines, which as far as I can tell requires only 5 clicks and possibly the pressing of the "a" key on the keyboard... at that moment, aren't you on the precipice of a choice between changing the color of the splines, or, pressing the DEL key on the keyboard and making them immediately go away?

Since you have to replace them anyway... why don't you do it at that moment?


STF
 
Status
Not open for further replies.
Back
Top