Results 1 to 2 of 2

Thread: Using VBScript in a formula property

  1. #1
    Member
    Join Date
    2007-06
    Posts
    5

    Default Using VBScript in a formula property

    I am developing custom electrical content in MEP2008, and my current mission is the automation of wire scheduling. Using a schedule table style driven by extended data stored in wire objects, I am able to have a schedule generate itself without any input from the user (that is except for one hurdle I am faced with). The problem I am struggling to overcome is to have automatic properties attached to wire objects that will grab the ID of the two devices that a wire is attached to, and store those ID's in the extended data of the wire.

    To illustrate the problem in a very simple way, I've attached a drawing containing a wire that is connected to a receptacle at each end (via an MEP electrical connector snap). I've also attached a spreadsheet with some data extracted from the drawing using the "dataextraction" command. Of particular concern is the "ConnectedObjects" method contained in the wire, which has a return type of "Autodesk.Aec.Building.Elec.DatabaseServices.ConnectedObjects". The fact that the MEP snap maintains a connection between the wire and devices, and the fact that there is a ConnectedObjects method within the wire would lead me to believe that there is a very straightforward way of accomplishing what I need to. I've already prepared the extended data for wires, and just need to come up with some code to insert in the formula property that will grab the ID's of devices connected to a wire and stick those ID's in the "Device1" and "Device2" text properties.

    My issue is that I am not familiar with writing VBScript, but it does appear that a formula property using VBScript just might be able to automatically extract the connection info for each wire and store that info back in the extended data of the wire. I would deeply appreciate any guidance that you guys could offer. I guess the biggest issue is whether VBScript in a formula property could actually call the ConnectedObjects method. I'm hoping some code guru's here could shed some light on the whole situation.
    Attached Files Attached Files
    Last edited by dswords; 2007-06-08 at 07:00 PM.

  2. #2
    Member
    Join Date
    2002-06
    Posts
    39

    Red face Re: Using VBScript in a formula property

    I'm hoping to get an automatic wire pull schedule also. I certainly seems like the info is there. Please let me know if you come up with an answer.

    Kim M.

Similar Threads

  1. Formula Property Definition PLEASE HELP
    By douglas.167342 in forum ACA General
    Replies: 1
    Last Post: 2010-02-18, 09:34 AM
  2. VBScript code in Property Definitions need HELP
    By jim.155208 in forum Style Management
    Replies: 2
    Last Post: 2007-12-21, 07:04 PM
  3. Formula Property Definition
    By jgardner.79905 in forum VBA/COM Interop
    Replies: 3
    Last Post: 2006-06-13, 12:58 PM
  4. Replies: 0
    Last Post: 2004-07-26, 12:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •