Jump to content

Outline project advice requested


Mr. HSbF6

Recommended Posts

Hi all.

 

I have a number of years experience both programming and using AutoCAD, but I haven't really ever programmed in AutoCAD, and as my company want me to make a new tool for us to use, I thought it could save me a lot of time if someone with the knowledge could give me a point of a point in the right direction.

 

I suppose my problem really is whether to use macros, LISP, etc. and what tools, therein to use to achieve my goals. Let me outline what I need my tool to do.

 

Outline of what the tool needs to do

  • Say we have several lines coming in at different angles to the same point. I need to be able to insert a block (or similar) on the intersection point.
  • The block needs to interact with the intersecting lines, and selecting a line as it's primary line (which the user will select with the aperture), we need to verify the secondary lines are no less than x degrees clockwise or anti-clockwise, relative to the primary line.
  • Preferably the lines coming in will be marked with attribs or similar, with something like startBlock and endBlock, depending on which blocks they tie in to.
  • At the end, we will require a table to be outputted displaying the blockID, the cordinates, and the angle relative to the primary line, that the second lines at at. We may well want to round up the angles, and apply different labels to them, based on our in-house system.

The requirements of the project

  • Needs to be portable and easy to install in case we need to give it to users in other offices. Preferably compatible with 2006+

Any advice on this project is extremely appreciated.

Link to comment
Share on other sites

I would say this would be possible...

 

My thinking would be to get the user to first select all the lines, then prompt for a "primary line" from which all the others would be measured from.

 

Then using "vla-IntersectWith", one could determine the intersection point and hence the block insertion point.

 

As for the angle problems, finding the angle of all the lines is not too difficult and so this part shouldn't be a problem.

 

I'm not sure what you mean about the attributes, if this could be explained slightly better, it would be much appreciated :)

 

As for the output - were you thinking a table within the ACAD drawing or an external file, i.e. an Excel Spreadsheet?

 

Hope this helps get you started

 

Lee

Link to comment
Share on other sites

I would say this would be possible...

 

My thinking would be to get the user to first select all the lines, then prompt for a "primary line" from which all the others would be measured from.

 

Then using "vla-IntersectWith", one could determine the intersection point and hence the block insertion point.

 

As for the angle problems, finding the angle of all the lines is not too difficult and so this part shouldn't be a problem.

 

I'm not sure what you mean about the attributes, if this could be explained slightly better, it would be much appreciated :)

 

As for the output - were you thinking a table within the ACAD drawing or an external file, i.e. an Excel Spreadsheet?

 

Hope this helps get you started

 

Lee

 

The easier it is, the better

Take a look at XData, say easy to add the start and

end point for every lines you wanted be

(and another info too)

 

~'J'~

Link to comment
Share on other sites

I would say to program it in lisp / visual lisp due to the fact you can compile it to a single file and no one can change it because you keep the source files. It will also run in any AutoCAD version.

You need to be extremely detailed in posting questions like trying to explain it to a bunch of 5th graders. It’s not that people are stupid (?) but the better someone understands the more likely they can be helpful.

 

Before starting a project of some complexity I always grab a note pad and write what is called pseudo code. Pseudo code is just plain English describing in as much detail as possible a step-by-step process you want to achieve.

 

Example of Pseudo code for selecting a line then resizing it then rotating it

 

I want the user to have a dialog box with a pick button and a text box for current length and one for new length and a text box for rotation angle.

 

When the user clicks the pick button make the dialog box go away so the user can pick a line. The program should loop until a line is selected or user hits escape.

 

If user hits escape display error message and bring back dialog box

 

If user selects a line, get line information and bring back dialog box showing current length.

User fills out new length and rotation angle then click ok

 

Program takes line info and resizes the line

Program takes rotation angle and rotates line

 

Dialog box reappears just in case user wants to make changes or select another line

 

The end of Pseudo code.

 

Now you can look over the code and really start to plan how to structure the program and layout the dialog box. I typical sketch out a dialog box before I make one.

 

By doing this you will be better prepared and have a better understanding of what you really want to accomplish and also you will be able to convey your ideas to others more exactly therefore cutting down on wasted time and programming.

Link to comment
Share on other sites

We have now decided we may give this job to an experienced CAD developer instead. If anyone is interested in taking this job, please contact me with a CV / resume and samples of your work.

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...