Author Topic: reinvent the wheel  (Read 7606 times)

0 Members and 1 Guest are viewing this topic.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
reinvent the wheel
« on: May 20, 2010, 03:18:43 PM »
A couple of thought provoking questions.  OK, so maybe I should give you some background first.  For those of you that dont know, I work for an Electric Utility.  Our typical construction prints consist for 4 basic types of drawings:
  • civil package - foundations, conduit, grounding plans
  • physical package - equipment layout, outline drawings of equipment, etc
  • schematic package - AC and DC schemes, control schemes, etc
  • Wiring package - how to hook all the stuff together
Now I have evaluated Autocad Electrical over the last 2 weeks, and while it is very cool, and automates a ton of work, it was designed more for panel manufactures than a utility.  There is so much front end work to pick out every part, manf., blah blah blah. that using it requires too much work.  Our substation and Relay crews install terminal blocks, and then wire them up.

Also, when I was evaluating Electrical, I was highly disappointed in that when AE inserts a contact or device, its just a stupid block, not even dynamic.  Also, instead of using some wisbang magic, it cuts/trims/breaks the line you inserted it upon.  Should you move the block, it doesn't fix the line.  Now there might be some AutoMagic in there somewhere that will fix the line, but I didn't find it yet.

So my question for you gurus is this: (and bear in mind I haven't done much research yet) should I reinvent the wheel in .Net to insert blocks and trim the lines or do it the old out of the box way?  I am all for making it uber easy with customization, but how hard might it be if the TRIM or BREAK methods aren't exposed to .Net.
« Last Edit: May 20, 2010, 04:46:27 PM by CmdrDuh »
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

LE3

  • Guest
Re: reinvent the wheel
« Reply #1 on: May 20, 2010, 03:31:02 PM »
I have used in the past getSplitCurves or GetSplitCurves from C# - that you can use to break or trim any Curve object - maybe?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: reinvent the wheel
« Reply #2 on: May 20, 2010, 03:50:36 PM »
FYI... You can use the ' Move Component ' command from the ' Components ' pull down, or type ' aemove ' at the command line.  It will move the component, remove the break, then break the line you move it to.  Only thing is, that the command only lets you select a single component.

If you want to move more, then I would use the ' Copy Circuit ' from the ' Componets ' pull down, then use the ' Delete Components ' command.  Not the best, but a work-around.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: reinvent the wheel
« Reply #3 on: May 20, 2010, 03:58:06 PM »
Out-of-the-box customization products (Adesk verticals) are good and bad.
Good: They have a team of programmers behind them and they are usually quality products.
Bad: They tend to do what *some* people thought *most* people want. And they try to please a wide variety of customers which means a lot of effort has to go into accommodating a wide variety of methods of working.
 
The beauty of doing it yourself is that you can make it do what YOU want. This is especially valuable when you go to tie in your design data with your company systems.


P.S. - Did I just see "Kenny Ramage" as the Latest Member? *blink* *blink*
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: reinvent the wheel
« Reply #4 on: May 20, 2010, 04:02:26 PM »
Just keeping track - a good part of our work is P&IDs (and some electrical drawings as well) which is pretty similar, I think. 

We use in-house stuff for the electrical drawings, as the department boss wants to keep things cheap and simple, no license costs, handles AutoCAD upgrades much better, etc.  Sounds like you might be better off rolling your own as well.  After a certain point the product requires so much customization to work "properly" you might as well.  Just keep in mind that others may have to work with your drawings, so not too wild and crazy.  Then again, I haven't even looked at Electrical so....  :angel:

Rather than trim or break, I just erase the original and redraw two lines instead (in LISP, no less).  I'm considering dumping some XRECORD data into the inserted object to reference the connected line handles so they can be relocated if the inserted object is moved.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: reinvent the wheel
« Reply #5 on: May 20, 2010, 04:29:07 PM »
...Rather than trim or break, I just erase the original and redraw two lines instead ...
This was one of my thoughts as well, especially since it is very easy to do in .Net.  I just didn't want to throw out my ideas til everyone else joined the party
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: reinvent the wheel
« Reply #6 on: May 20, 2010, 04:30:35 PM »
I have used in the past getSplitCurves or GetSplitCurves from C# - that you can use to break or trim any Curve object - maybe?
Good to know, thanks Luis
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

uncoolperson

  • Guest
Re: reinvent the wheel
« Reply #7 on: May 20, 2010, 07:12:48 PM »
use the autocad electrical move component command.

My old department uses electrical for schematics, though none of the interface for electrical remained the same took a few hundred hours of rewriting things (in lisp) to work how I want them to.

the reports are nifty, not sure if it's worth the costs, but if you get in to it you can get it to do what you want (or atleast for what we wanted).... even when the reseller and instructor both said "it can't be done" (ha!).

Bryco

  • Water Moccasin
  • Posts: 1883
Re: reinvent the wheel
« Reply #8 on: May 21, 2010, 09:45:00 AM »
Perhaps this could be a good use of the new 2d parametric stuff. Tie the line to a point on the block. I have no idea if this is exposed in net.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: reinvent the wheel
« Reply #9 on: May 21, 2010, 11:03:02 AM »
I never thought of that, that could be very cool.  I haven't installed 11 yet, but I will have to look into that.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: reinvent the wheel
« Reply #10 on: May 21, 2010, 04:49:07 PM »
Preliminary testing done, I'm liking the read a Line, erase and draw 2 new lines with a gap between them.  Kudos to Kerry for the GetPointbyVector function.  Next, I am trying to decide how/where to store the data behind the scenes for the connections.  I'm open to suggestions.  So far I'm thinking XRECORDS or Dictionaries.  I know nothing about either, so please let me know which would be better.  I can provide a dwg file if that would help explain what Im thinking (assuming that would make 1 better than the other)
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: reinvent the wheel
« Reply #11 on: May 21, 2010, 06:23:22 PM »
You need dictionaries to store XRECORDS so I say both.   :wink:

My preference is for creating an application-specific dictionary under the inserted objects extension dictionary, with XRECORDS as necessary to track information e.g. soft pointer handles.  You could also put them into a drawing dictionary but that creates a couple of extra steps for getting the information.  I find XRECORDS and dictionaries a little easier to deal with than XDATA, but thats another option.

You will probably want to add a pointer back to the inserted object to the two new lines (and copy the existing ones from the erased line) so you can get back to the inserted object by line.  Add a pointer to each new line to the inserted object, and using either monitoring command use or creating your own commands you can adjust both connecting lines and inserted objects as needed.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8702
  • AKA Daniel
Re: reinvent the wheel
« Reply #12 on: May 21, 2010, 08:49:32 PM »
 Should you move the block, it doesn't fix the line.

what about a persistent reactor?

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: reinvent the wheel
« Reply #13 on: May 22, 2010, 10:03:50 AM »
You need dictionaries to store XRECORDS so I say both.   :wink:
I told you I know nothing about what I speak
My preference is for creating an application-specific dictionary under the inserted objects extension dictionary, with XRECORDS as necessary to track information
e.g. soft pointer handles.  You could also put them into a drawing dictionary but that creates a couple of extra steps for getting the information.
Do you have a small example of this?
....or creating your own commands you can adjust both connecting lines and inserted objects as needed.
Exactly what I was thinking
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

sinc

  • Guest
Re: reinvent the wheel
« Reply #14 on: May 22, 2010, 10:25:24 AM »
You may want to take a look at this for a sample of how to use soft pointer ids:

http://through-the-interface.typepad.com/through_the_interface/2006/11/linking_circles_1.html