New Coding for HVAC Program...

Discussion in 'AutoCAD' started by joeynich, Feb 17, 2004.

  1. joeynich

    joeynich Guest

    I am trying to write code for a new program and I am not sure where to start. My program will involve the user picking a single line duct layout with air pressures at the end of every run. The program will need to look at the air pressure to know how to double line the run. The main will increase with size as more runs are calculated back to the fan. If anyone is interested in pointing me in the right direction on starting this project please help. Thanks.

    Joe
     
    joeynich, Feb 17, 2004
    #1
  2. How is the text getting placed at the end of the runs? Are you using
    Trane software or something similar, or is the user adding the text? If
    its the user, start there - write a program that adds the text *and*
    adds xdata to the 'run' line so it'll be easier for this program to
    access the data.

    Otherwise, start with a piece of paper and map out the dsired
    functionality. If no xdata, how will the program know wh/where the text
    is? Will the user select the run and then the text? Will the user select
    the run and your program will 'look' for the text within a given radius
    out from the end points? Will the user select anything at all, or can
    your program do it based on layers?

    Once you've sketched out your program, try and write it to do first one
    run and then add another to it. After you can do two back to back, the
    rest should be easy because you'll just be expanding on them for the
    remainder.
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Feb 18, 2004
    #2
  3. joeynich

    Nihal Guest

    I have a program for HVAC duct designing. You can have a look at it. Comments are welcome.
    www.hvacsimular.com
     
    Nihal, Feb 18, 2004
    #3
  4. joeynich

    joeynich Guest

    Ok. If I use selection sets to get all my lines how do I get that data? I need the start and end point of every line. I am confused. Do I need to use an array and how?

    Joe
     
    joeynich, Feb 19, 2004
    #4
  5. Again, Joe, start with just one line and one piece of text...

    - select it
    - set a variable to hold the start point
    - create a circle of x circumference
    - create a selection set of all text [on a unique layer?] and iterate
    thru that selection set to see if any intersect with your circle, or
    have their start point within your circle. Then expand the circle until
    you find something - its going to be a lot of coding:)
    - once you've got that working for this one end, set your code to cycle
    both end points
    - once it works for both, extend it to work for all lines within a
    selection set [this is why xdata would be easier!!!]

    As for an array, who knows??? There are any number of ways you could
    store the info. I, personally, use scripting dictionaries - faster
    because you can search them.
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Feb 20, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.