Author Topic: Warning system for CAD  (Read 5784 times)

0 Members and 1 Guest are viewing this topic.

cadmoogle

  • Guest
Warning system for CAD
« on: January 07, 2009, 08:59:03 PM »
Well here's my new situation. We have a new set standards for how we do our blocks. Well some of this process involves the end user having to rename a block a certain way. Is it possible to have a routine that would check before closing a drawing (ran automatically) and so a user can not modify or remove that command. If the blocks in the drawing are not properly named it will warn the user with a popup and list of blocks that must be renamed. Then to top it off provide a report error log save as a text file in a defined location.

I could provide a list of blocks to the routine

8WMGV, 6WMGV, etc..

I'm not sure how it would work if it needs to be ran on the closing of a drawing.

Does anyone have any suggestions?

I've also posted on Cadalyst
http://forums.cadalyst.com/showthread.php?p=23291#post23291

Thank you in advance,
Daniel

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Warning system for CAD
« Reply #1 on: January 07, 2009, 10:13:57 PM »
Can't you just rename the blocks (via code) instead of having the user do it?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

uncoolperson

  • Guest
Re: Warning system for CAD
« Reply #2 on: January 07, 2009, 10:19:37 PM »
create a selection set of all blocks
then itterate through the set and if the block name is valid (passes a pattern test or is in a list elsewhere) remove it from the sset
set all invalid blocks to a layer titled "invalid", with a nice color that clashes real bad
alert the user to what just happened, have it alert you to what happened, then walk up and smack user

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Warning system for CAD
« Reply #3 on: January 07, 2009, 10:23:24 PM »
Like Michael said use a lisp to rename the blocks. You could use a reactore to activate the lisp.
Look in to this function vlr-beginclose click on it to see the topics.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

cadmoogle

  • Guest
Re: Warning system for CAD
« Reply #4 on: January 07, 2009, 10:33:13 PM »
One of the blocks they rename are Fire Hydrants(WM_FIREHYD). We have to number our hydrants for tracking purposes so using a command we have in place they're able to quickly rename the block to WM_FIREHYD_####. It would be hard to automate that due to the fact they're not numbered until we add, or correct missing numbers.

The only other renaming the users will have to do is at the end of the job. We keep an inventory of as-builts that all have different names (IE BF-1, OL1-2, etc.). So to make it easier to identify in our GIS system the rename command is used to add the as-built name as a prefix. BF-1 then becomes BF.1_WM_FIREHYD_#### and OL1-2 turns into OL1.2_6WMGV.

This data imports into our GIS software and using some scripting there I can easily attribute the data. There is a method behind the madness, but with that comes flaws since I'm no longer doing the CAD portion of this the users have a learning curve. Now more and more cases are appearing where blocks are not being renamed, and I think if something like this were possible it would be a great way to notify the users.
« Last Edit: January 07, 2009, 10:37:30 PM by cadmoogle »

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Warning system for CAD
« Reply #5 on: January 07, 2009, 10:44:40 PM »
I read that twice but missed the part that explained why it's better to have users rename the blocks rather than your code other than "they're not numbered until we add, or correct missing numbers" which says to me "keep said data in a database, and make it available to the renaming utility".

Sorry, I don't have much faith in CADD operators to do the right thing consistently in this regard.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

cadmoogle

  • Guest
Re: Warning system for CAD
« Reply #6 on: January 07, 2009, 10:57:23 PM »
I read that twice but missed the part that explained why it's better to have users rename the blocks rather than your code other than "they're not numbered until we add, or correct missing numbers" which says to me "keep said data in a database, and make it available to the renaming utility".

Sorry, I don't have much faith in CADD operators to do the right thing consistently in this regard.

We have an excel document that is currently being used to track hydrants. That may change soon due to the fact we're now using an SQL database. The excel document has a large number of hydrants in it, which is updated by the CAD operator. Once a new drawing is completed, if a new hydrant is installed the user goes to the document and sees the last number used. They enter the next number, size of the main, and description of the location in the excel document. They go back to CAD and create a new text object with the number and place the text/label next the hydrant. Then run the command to rename the block with the number.... Honestly I don't know what's better or how to automate it. I was trying to keep it was simple as possible. How could I further automate it with less operator work?

 

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Warning system for CAD
« Reply #7 on: January 07, 2009, 11:14:07 PM »
What you've described is ripe for automation (in some regards a textbook app), the program providing users choices born of the data, and then updating / maintaining the data to reflect said user choices. It's not difficult, tho it's no "knock it out in a half hour thing" and would need to be made to fully work on paper before it was committed to code, something a surprising number of coders turn their nose at. If I weren't putting in 70 hour weeks I'd help you knock out a written blueprint. There's lots of talent here tho, maybe someone's interest will be piqued. But I digress, maybe that's not what you want at all and are satisfied with the current method which, I'm sorry to say, will likely fail unless you have extraordinary users, which, considering your opening post ...
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

KewlToyZ

  • Guest
Re: Warning system for CAD
« Reply #8 on: January 08, 2009, 08:55:14 AM »
I'm curious why you change the block names instead of just using the same block?
Use the block attributes and a simple iteration routine to set the values for the attributes?

quamper

  • Guest
Re: Warning system for CAD
« Reply #9 on: January 08, 2009, 10:28:41 AM »
I'm curious why you change the block names instead of just using the same block?
Use the block attributes and a simple iteration routine to set the values for the attributes?
That's what I was wondering as well. That sounds like the simplest solution. Other than having to modify lots of existing blocks.

cadmoogle

  • Guest
Re: Warning system for CAD
« Reply #10 on: January 08, 2009, 12:35:26 PM »
We have 5 different blocks for hydrants, since no hydrant is laid out the same in our system. To make it easier to identify we place the hydrant number on the end of the block. It's really for our GIS system. Same with renaming all of the blocks at the end of the job. In the GIS system we attribute the as-built number, etc. so I have some SQL expressions I use to isolate the objects and then I can quickly attribute each feature. If the number was not attached to that block name I would have go through and manually attribute that number myself along with all of the other information. If it's done from the start I can actually join the table based on that hydrant number (since it's a unique ID) and transfer the information; description, size of main it's connected too, etc..

 

cadmoogle

  • Guest
Re: Warning system for CAD
« Reply #11 on: January 08, 2009, 12:58:47 PM »
I figured the automation process would be lengthy to code, versus something that sees a certain block name in in the drawing and flags a message when it closes and or saves to a text file. More than likely I probably just jumped straight into the deep end... :kewl:

I guess our system might be too dependent on the operators...which it has been that way way before I got here, I'm just trying to make things more standard.

So you guys are thinking more along the lines of having it know the next number to to rename the hydrants to without repeating, and renaming the blocks automatically.

IE

Closing the drawing..

Prompt...Non-standard blocks located in drawing, do you wish to correct? Y or N

Y....

This is where it gets tricky. Our operators will place two-three as-builts within a drawing in model space. Each has a title block around the as-built, but the DWG name will be saved as BF-1,2,3.dwg. So you would not be able to use the file name to name the blocks. So something that would prompt the user to window over the as-built (selecting all of the objects) then prompts them to enter the as-built number. Then it will rename the items for them.

If it sees fire hydrants still named with the default names it will flag them

Do you wish to number the fire hydrants? Y or N

Then it will do so based off of a starting number defined by the user?

I might be rambling, sorry I'm just trying to think of ideas ....  :lol:




T.Willey

  • Needs a day job
  • Posts: 5251
Re: Warning system for CAD
« Reply #12 on: January 08, 2009, 01:13:35 PM »
If the title blocks are real blocks, then that will define the area for the sheets, so the operator would not need to select anything, especially if the title blocks is attributed also because then you would know the information, as far as sheet numbers and stuff like that.

It really does sound like the number could be done automatically.
Tim

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

Please think about donating if this post helped you.

cadmoogle

  • Guest
Re: Warning system for CAD
« Reply #13 on: January 08, 2009, 01:24:46 PM »
If the title blocks are real blocks, then that will define the area for the sheets, so the operator would not need to select anything, especially if the title blocks is attributed also because then you would know the information, as far as sheet numbers and stuff like that.

It really does sound like the number could be done automatically.

Attached is an image of the layout of one of our dwgs. This is saved as TC1-9.dwg, but contains 9 sheets (TC-1, TC-2, etc) in "title blocks" that are not real blocks. When the blocks are inserted they do not have the as-built name as a prefix. Normally each is copied into a separate dwg, renamed and copied back in. Since each dwg can use the same block IE 8WMGV. So you're saying it's possible to have code find the area a block is and identify it with an as-built number based off a title blocks name?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Warning system for CAD
« Reply #14 on: January 08, 2009, 01:30:54 PM »
It could be based off the name of the blocks, or an attribute of the block that has some information within it, as far as drawing name and that stuff.  And yes, with code you can find the area of the blocks, and used said area to number each hydrant in numeric order, if each sheet starts at 1.  But that would mean the ' title blocks ' are real blocks.  If not, then it is harder to determine where sheets start/end.
Tim

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

Please think about donating if this post helped you.