AutoCAD Architecture Customization

AutoCAD Architecture Customization

Reply
Valued Mentor
mdhutchinson
Posts: 2,302
Registered: ‎11-18-2003
Message 1 of 10 (1,129 Views)

MEP or ARCH Schedules: Possible to write VBScript formula property to...

1129 Views, 9 Replies
12-21-2010 10:10 AM

I have a property that is currently a manaul property.

The user does ScheduleCellEdit on each table cell down the list... but down the schedule column it is always 0001  -  0002  -  003 etc. down the column from top to bottom.

Is there a way I can automate this with a Formula Property... that would populate the schedule from top to bottom and write the value of the calculated property back to the objects?

(See attached image.)

*Expert Elite*
David_W._Koch
Posts: 2,590
Registered: ‎12-09-2003
Message 2 of 10 (1,120 Views)

Re: MEP or ARCH Schedules: Possible to write VBScript formula property to...

12-21-2010 04:32 PM in reply to: mdhutchinson

I do not think you could do that with a formula property, but you might look into making the property an Auto Increment - Integer type.  You could create a Property Data Format for integers that would force the leading zeros.  The numbering will be automatically assigned as you add the property set to each object.  You can use the renumber tool to change the numbering afterwards  - but you will need to be able to select each object to do so.  Otherwise, you would have to edit each cell/object and change the number manually, as you do now.

David Koch
Valued Mentor
mdhutchinson
Posts: 2,302
Registered: ‎11-18-2003
Message 3 of 10 (1,108 Views)

Re: MEP or ARCH Schedules: Possible to write VBScript formula property to...

12-22-2010 06:43 AM in reply to: David_W._Koch

Yes I tried that... However using ScheduleCellEdit allows the like items to stay grouped with a quantity... Due to the fact that you cannot select multiple items to assign the auto inc number to.

The 0001,  0002,  0003 etc are used for Shipping Marks, or Piece Marks... And get attached to the like parts when they are shipped from the shop...

As soon as I use autoincrementing number all the like items with their quantity now become diss-similar and are listed as quantity 1 on each line...

What I think I need is a way to automate this with LISP... if there was a command line way to fill a manual property I'd be half way there.

 

Side Note: One thing I DO NOT LIKE about Auto Incrementing option is that there's no way to dis-allow duplicates.

 

The other way I thought about R&D is to create a simple Excel sheet with a single column.... 0001, 0002, 0003 to 9999...

Then attempt to write some VBScript formula property (or perhaps a Formula Column in the table) that might work.

(I am brand new to VBScripts but have stumble through a couple of formula properties with a SELECT CASE statement.)

You don't know a back door way to assign a manual property value from the command line do you?

 

Do you have any idea if formula properties can carry and modify a VARIABLE used as a counter... And add 1 to it with every line in the schedule.

 

 

*Expert Elite*
David_W._Koch
Posts: 2,590
Registered: ‎12-09-2003
Message 4 of 10 (1,095 Views)

Re: MEP or ARCH Schedules: Possible to write VBScript formula property to...

12-22-2010 03:24 PM in reply to: mdhutchinson

Ok, I did not realize you had multiple items for each line - I suppose I should have looked at your sample schedule a little closer and noticed the quantity column.

 

I do not know of a way to do what you ask.  A formula property would have no idea where a particular object was in the schedule table.  A formula column might have a shot, but again, I do not know how it would know what row it was on.  And the formula column would not report back to the object itself, if you need the data there, too.

 

Are all of the scheduled items AEC objects?  If not, could they be (eg, use a block as a view block in a Multi-View Block, and then place Multi-View Blocks in lieu of the block)?  If so, you might be able to make the piecemark property a style-based property, and only have to enter the value once for each piece.  The problem there will be if you have one style that generates multiple pieces (different sizes but all the same style, for example), then that would not work.

 

Sorry I can not offer anything more positive than that.

David Koch
Valued Contributor
JustoAg
Posts: 80
Registered: ‎09-23-2008
Message 5 of 10 (1,080 Views)

Re: MEP or ARCH Schedules: Possible to write VBScript formula property to...

12-23-2010 01:02 PM in reply to: mdhutchinson

mdhutchinson wrote:

What I think I need is a way to automate this with LISP... if there was a command line way to fill a manual property I'd be half way there.


Yes, there is a way to automate filling data manually using lisp. It is using the -PropertyDataEdit command like in:

(command "-PropertyDataEdit" ename "" "PSD_Spaces-Obj:IDNum" idnum "")

Just take a look at this posibilities. Need to have a PSD with a manual prop declared. You can then automate this operation.

Hope this helps.

 

Justo Aguiar.

 

Valued Mentor
mdhutchinson
Posts: 2,302
Registered: ‎11-18-2003
Message 6 of 10 (1,072 Views)

Re: MEP or ARCH Schedules: Possible to write VBScript formula property to...

12-23-2010 01:25 PM in reply to: JustoAg

Justo Aguiar.   thank you - thank you - thank you!!!!!

 

It works... now to figure out how to get the objects I need.

 

Did you by chance look at the image... I need to somehow get the similar objects to assign them the same piece mark value.

This may be a long shot... !!!!

I could do an intermediate schedule style and add the objects Handle but without the Quantity column, sort the list by description and length export to excel - then call the data back into lisp and use the Handle to get the entities.

You have opened up a way to do this I think!

... any other thoughts would be greatly appreciated!

Valued Contributor
JustoAg
Posts: 80
Registered: ‎09-23-2008
Message 7 of 10 (1,054 Views)

Re: MEP or ARCH Schedules: Possible to write VBScript formula property to...

12-24-2010 07:08 AM in reply to: mdhutchinson

Well, It's not so easy to fullfill every detail on your specific scenario. I've attached you a lisp and a dwg with only sutil approches just to drive your attention on some existing tools and possibilities. That's all I can do with all the gaps and doubts I have in this case as for example what you define as similar objects and many other thing not easy to know from a distance. With no compromise fror my side you could write to my email (in the header of the lisp file) maybe with a sample dwg and maybe I could give it a better try, hopping it is not so complicated.

Notice that in the dwg I've created a list (in the Style Manager) just for make it simple to select the descriptions of every piece avoiding typos from the user.

Well, good luck and Merry Christmass.

 

Justo Aguiar

Valued Mentor
mdhutchinson
Posts: 2,302
Registered: ‎11-18-2003
Message 8 of 10 (1,038 Views)

Re: MEP or ARCH Schedules: Possible to write VBScript formula property to...

12-27-2010 06:53 AM in reply to: mdhutchinson

thanks...

 

I tooked a look at your lisp...

 

The fields in the data in my case are all automatically populated except for this MARK field...

and I can automate this also with the approach I suggested.

I've done many lisp apps with this approach... just not with MEP as the application.

Most of the program code I already have...

 

Thanks for your leg up with the command line interface to apply property set manual values... this was the piece I was missing.

*Expert Elite*
Keith.Brown
Posts: 1,180
Registered: ‎03-13-2008
Message 9 of 10 (951 Views)

Re: MEP or ARCH Schedules: Possible to write VBScript formula property to...

01-08-2011 12:46 PM in reply to: mdhutchinson

What you should try is the part numbering feature of autocad mep.  From your picture it looks like your numbering is for the fabrication of your hangers.  If you just tag your hangers and it will add the part number property set to your part.  It is that property set that you will add to your schedule.  Hopefully this helps and is what you are looking for.


Keith Brown AutoCAD MEP BLOG | RSS Feed
AutoCAD MEP 2014 | Revit 2014 | EastCoast CAD/CAM V6.1 | Visual Studio 2013
────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate. Thank you!
Contributor
CV438
Posts: 23
Registered: ‎08-18-2007
Message 10 of 10 (433 Views)

Re: MEP or ARCH Schedules: Possible to write VBScript formula property to...

05-25-2012 01:45 PM in reply to: mdhutchinson

Maybe this is what you are looking for.  I use this to renumber doors and windows when I have deleted one in the sequence.  It is in dotNet.

 

http://www.theswamp.org/index.php?topic=39371.0

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.