Author Topic: AutoCAD Architecture & MEP Scheduling Tools  (Read 3111 times)

0 Members and 1 Guest are viewing this topic.

Jeff H

  • Needs a day job
  • Posts: 6150
AutoCAD Architecture & MEP Scheduling Tools
« on: September 06, 2011, 06:15:42 AM »
I am trying to get ideas.
I was wanting input on different tools to have like in the thread above and how you would like them to work.
This thread got me started with the idea http://forums.autodesk.com/t5/AutoCAD-Architecture/3rd-party-utilities-for-editing-property-data/td-p/3118356
 
I started messing with it and can not make up my mind how to do it and keep changing my mind,
so I am tired of coding then erasing it and starting over so I need some input on how it you think it should be.
 
Just to get something started I made this and it is thrown together quickly to get something going and needs improvement but was just to have something to show until I get some input.
For example the test drawing that is attached has 25 doors and they are tagged.
2 of the doors get deleted which leaves you with a schedule like this
 

 
You run the command UpdateAmepSchelduleNumbering then select the scheldule and the form pops up
 

 
 
It is pretty self-explanitory and now your schedule will be
 

Inside the HpadCadAmep folder is another folder containing dll's and code
HpadCadAmep-------for 2012
HpadCadAmep2011-------for 2011
 
Each has a bin>Realease Folder containing the dll the netload.
Win 7 users probably need to right click properties and click unblock BEFORE unzipping.
 
 
« Last Edit: September 06, 2011, 06:21:27 AM by Jeff H »

Hugh_Compton

  • Guest
Re: AutoCAD Architecture & MEP Scheduling Tools
« Reply #1 on: September 06, 2011, 06:33:42 AM »
 
Hi Jeff

You would need some method of 'retaining' the door numbers for the doors that have been built.  This would allow the user to renumber only the items that they wished to. 

Also, if the items were walls (or other entities with variable qualities), the program would need some way of totalling / adding the wall lengths IF the user desired (so that they could schedule some or all of the walls individually if needed).

Trying to satisy everybodies schedule requirements is a mad mans task, good luck!!!

PS I have attached a screenshot from my own program - the difficulty I had was allowing the user to mix items into the same schedule table that had Property Set Data with items that had style information (example - a structural member has a length and a style name).   

kaefer

  • Guest
Re: AutoCAD Architecture & MEP Scheduling Tools
« Reply #2 on: September 07, 2011, 05:34:04 AM »
Ace Scheldule indeed.

Here's the renumbering part in an overly functional style:
Code: [Select]
type acadApp = Autodesk.AutoCAD.ApplicationServices.Application
type acadObjectId = Autodesk.AutoCAD.DatabaseServices.ObjectId

module Seq =
    let zipConst x =
        Seq.initInfinite (fun _ -> x) |> Seq.zip

let updateScheduleNumbering scheduleId lowerLimit upperLimit increment =
    let doc = acadApp.DocumentManager.MdiActiveDocument
    let db = doc.Database
    let ed = doc.Editor
    use tr = db.TransactionManager.StartTransaction()
    let inline OPEN oId = tr.GetObject(oId, OpenMode.ForRead, false, false) :?> _
    let MAPOPEN oids = oids |> Seq.cast<acadObjectId> |> Seq.map OPEN

    let scheduleTbl : ScheduleTable = OPEN scheduleId
    MAPOPEN scheduleTbl.SelectionSet
    |> Seq.collect (PropertyDataServices.GetPropertySets >> MAPOPEN)
    |> Seq.collect (fun (propSet : PropertySet) ->
        let propSetDef : PropertySetDefinition =
            OPEN propSet.PropertySetDefinition
        propSetDef.Definitions
        |> Seq.cast<PropertyDefinition>
        |> Seq.zipConst propSet )
    |> Seq.map (fun (propSet, propDef) ->
        (propSet, propDef.Id), propDef.DataType )
    |> Seq.filter (fun (_, dataType) ->
        dataType = Autodesk.Aec.PropertyData.DataType.AutoIncrement )
    |> Seq.map (fun ((propSet, pid), _) ->
        (propSet, pid), (propSet.GetAt pid :?> int) )
    |> Seq.filter (fun (_, value) ->
        value >= lowerLimit && value <= upperLimit )
    |> Seq.iter (fun ((propSet, pid), value) ->
        propSet.UpgradeOpen()
        propSet.SetAt(pid, value + increment) )

    tr.Commit()


Jeff H

  • Needs a day job
  • Posts: 6150
Re: AutoCAD Architecture & MEP Scheduling Tools
« Reply #3 on: September 07, 2011, 06:14:57 AM »
Ace Scheldule indeed.
Here's the renumbering part in an overly functional style:

SWEET!
 

CRAIGV

  • Guest
Re: AutoCAD Architecture & MEP Scheduling Tools
« Reply #4 on: September 10, 2011, 10:44:18 AM »
Jeff: works great!  I really like the fact that it checks "dupes" and "gaps" in the schedule numbering.  One misspelling:

"Select Scheldue for what objects will number added:"

Jeff H

  • Needs a day job
  • Posts: 6150
Re: AutoCAD Architecture & MEP Scheduling Tools
« Reply #5 on: September 12, 2011, 11:00:29 AM »
Welcome to the Swamp!!
and that is good to hear.
 
I through it together quickly so I need to look back it and see what needs improvements.
The misspelling is my trademark.