AutoCAD Architecture Customization
Welcome to Autodesk’s AutoCAD Architecture Customization Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

9 REPLIES 9
Reply
Message 1 of 10
mdhutchinson
1534 Views, 9 Replies

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

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.)

9 REPLIES 9
Message 2 of 10
David_W_Koch
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
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 3 of 10
mdhutchinson
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.

 

 

Message 4 of 10
David_W_Koch
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
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 5 of 10
JustoAg
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.

 

Message 6 of 10
mdhutchinson
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!

Message 7 of 10
JustoAg
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

Message 8 of 10
mdhutchinson
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.

Message 9 of 10
Keith.Brown
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.

Message 10 of 10
CV438
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

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost