PDA

View Full Version : ABS2007 Property set help



stelthorst
2007-03-26, 05:54 PM
Hi All,

Once again my lack of programming knowledge is haunting me. I want to create a property set (PS) that gives me the radius of bends. Unfortunately this is not one of the automatic properties of a conduit bend. (Don't ask me why)

This gives me two alternatives. If I use the Part Name PS it reads "BENT CONDUIT EMT SET SCREW 60-RADIUS" The 60 RADIUS is all I need. Is there a way to add a formula PS that would only return the last part of the Part Name PS. Just to let you know I have several different radiuses in a drawing and I need to be able to distinguish between them so that we can order material.

The second alternative is probably the cleaner way but it is also the one that I have less of a clue as to how to do it. This would require extracting the radius via code from the Conduit Fitting.

This frustrates me because I know where I set the radius in the catalog, I know that ABS can read it because it will show up in the Part Name and other property sets but I don't know how to write the code to extract it myself.

Any help with either method (or if you have other ideas) would be greatly appreciated.

david_peterson
2007-03-26, 06:16 PM
Not knowing how these parts are created, I'm' not sure if this will help. I'm wondering if you can add either a attribute or something to the block that you can then create an automatic PSD for. I'm in the same place you are when it comes to these things; Lost. Do these get created via the Mview parts set to a catalog ro something? A little more info may help.

stelthorst
2007-03-26, 06:31 PM
Not knowing how these parts are created, I'm' not sure if this will help. I'm wondering if you can add either a attribute or something to the block that you can then create an automatic PSD for. I'm in the same place you are when it comes to these things; Lost. Do these get created via the Mview parts set to a catalog ro something? A little more info may help.
ABS uses catalogs for conduits, and conduit fittings. These catalogs are in addition to MVParts and if you click on a fitting and look at the properties it shows up as a Conduit Fitting and not an MVPart.

The OOTB conduit fitting uses a multiplier of 6X the conduit diameter to create conduit bends. I have created my own conduit bends with radiuses of 24", 36", 48", 60", 10', 12.5' and 25'. We have projects that require these radius sizes in the specs. For example, the project I'm working on now requires 60" bends for conduits entering buildings and 12'-6" radius bends for all site conduits. I am trying to run a report of the underground conduit and fittings and need to show the radius of the bends in my schedule.

Hope this helped clarify what I'm trying to do.

david_peterson
2007-03-26, 06:55 PM
Just a thought here. If you have one block that gets read through the table/catalog and every conduit in the catalog will have a 60" radius regardless of size, I think you should be able to simply add a note in the block for the PSD to read. When I look at multi view block reference options in the Automatic propery source dialog box (inside the PSD style) I see listings like Description, and description from definition (I think I'd try that one first). I'm thinking that if you add this info (60" radius) in the block description (not the name) any block you create from that one, "should" (in threory) contain it. Just a thought. Now you can tell me how far off my rocker I am. Remember I only have ADT2005 to play with so I'm not sure what's available for you in the terms of automatic prop source options for those things. Hope this helps.

dkoch
2007-03-26, 11:13 PM
Hi All,

Once again my lack of programming knowledge is haunting me. I want to create a property set (PS) that gives me the radius of bends. Unfortunately this is not one of the automatic properties of a conduit bend. (Don't ask me why)

This gives me two alternatives. If I use the Part Name PS it reads "BENT CONDUIT EMT SET SCREW 60-RADIUS" The 60 RADIUS is all I need. Is there a way to add a formula PS that would only return the last part of the Part Name PS. Just to let you know I have several different radiuses in a drawing and I need to be able to distinguish between them so that we can order material.

The second alternative is probably the cleaner way but it is also the one that I have less of a clue as to how to do it. This would require extracting the radius via code from the Conduit Fitting.

This frustrates me because I know where I set the radius in the catalog, I know that ABS can read it because it will show up in the Part Name and other property sets but I don't know how to write the code to extract it myself.

Any help with either method (or if you have other ideas) would be greatly appreciated.
Are "Conduit Fittings" an ABS object type? Or are they something else [AutoCAD block, 3D solid, whatever] with extended entity data that ABS uses to recognize it as a "Conduit Fitting"? To change the radius of a "Conduit Fitting" can you simply change a number in the Properties palette, or do you have to change to the Style/Definition that has the desired radius embedded within it? I ask because it may make a difference in what the best approach would be.

I do not have access to ABS and am not even close to being an "expert" on the ADT object model, but have had limited success [with a lot of help from others] in extracting data from an object. That data has to be "exposed" and the formulas end up being release-specific or include a section that determines the active release - which still needs to be updated for each new release. The ADT Help has a section called Architectural Desktop ActiveX Reference that contains subsections that describe the various objects and what properties can be accessed. If the radius property of a Conduit Fitting object is exposed to the ActiveX interface, you may be able to retrieve it with a formula property. Before going that route, you may find one of the following an easier method.

Your post implies that the "Part Name" is available as an automatic property source, and that the radius is embedded in the part name. If the formatting of the part names is consistent, you could extract the radius information with a formula property and convert that to an integer or real number that could then be used for whatever purposes you need. The 10', 12.5' and 25' radii you mention in one of your replies gives me pause, unless in the part name those are expressed as 120, 150 and 300. Not that you could not work out a way to deal with a value in feet, but that would make the formula more complex. Ideally, the radius part of the part name would be a fixed number of characters and always occur at the same relative place in the name string. If your biggest radius were always less than 999 inches, then three digit would do.

For example, suppose the naming convention were like this:
[whatever text your heart desires here, of any length that ABS can handle]nnn-RADIUS
where nnn is the radius in inches [24" = 024, etc]. Further allow that an automatic property called [PartName] has been definined and will contain the name of the Conduit Fitting as a string. The following would extract the radius and return the value as a real number:

CDbl( Left ( Right ("[PartName]", 10), 3) )

The Right function returns the rightmost ten characters of [PartName], as specified by the 10 parameter, which would give you "nnn-RADIUS". The Left function operates on that result, returning the specifice three leftmost characters, which would be the radius value, as a string. The CDbl function forces that string of numerals to be considered a real number.

Extracting the value from the Part Name requires a somewhat rigid method of naming the parts. If some variation needs to be accommodated, the formula property would have to be able to deal with that.

A third option exists if Conduit Fittings have styles or definitions to which a style-based PSD could be attached and if a given style always has the same radius. That would allow you to create a manual property in the style-based PSD, attach it to the Conduit Fitting style/definition, and enter the radius value. Not as satisfying as an automatically derived value, but beats manually entering the radius value on every single instance.

The attached file was done in ADT 2004 and shows the sample formula above at work in a "simulated" test where the "PartName" is a manual property but the formula does the parsing and returns the radius. The property set is an object-based one attached to lines.

stelthorst
2007-03-26, 11:44 PM
Are "Conduit Fittings" an ABS object type? Or are they something else [AutoCAD block, 3D solid, whatever] with extended entity data that ABS uses to recognize it as a "Conduit Fitting"? To change the radius of a "Conduit Fitting" can you simply change a number in the Properties palette, or do you have to change to the Style/Definition that has the desired radius embedded within it? I ask because it may make a difference in what the best approach would be
Yes Conduit Fittings are ABS objects. Basically they are parametric parts. The radius is a calculation within the conduit fitting style. You cannot access or change the radius from the properties palette. As mentioned before the OOTB conduit fitting style uses a calculation of 6X the diameter of the conduit to determine the radius. I have created my own styles with different radii by simply changing this calculation to a hard number (ie 120 for a 10' radius bend.

My preferred method of extracting the radius would be to try to extract it from the style. If you have ideas as to how I can do it this way it would be much appreciated

In the meantime I'm going to play with the other method you suggested. I have used the left and right functions in Excel and assumed they were available in ABS but didn't know the proper format for entering it.

Thanks for your help and I'll post back with my success (or failure) in my attempt.

dkoch
2007-03-27, 12:11 PM
My preferred method of extracting the radius would be to try to extract it from the style. If you have ideas as to how I can do it this way it would be much appreciated.
It may be possible. Unfortunately, my approach to this is usually a combination of seeing if I can find what I want in the Help section on the Object Model [I assume ABS has a similar section for its objects], plugging it into a test formula and seeing if I can get it to work. When that fails, a post to the AutoCAD Architecture Customization Discussion Group [web browser (http://discussion.autodesk.com/forum.jspa?forumID=54) or newsreader (news://discussion.autodesk.com/autodesk.aec.arch-desktop.customization)] has sometimes yielded some help from those more familiar with the object model that I, through VBA or .NET adventures they have undertaken. No doubt equally valuable help might be obtained from the AUGI groups devoted to customization - the advantage of the Autodesk group is that it is specific to ADT/ACA, so you will get people familiar with ADT objects in it.

I will try to post some code later on that should allow you to "access" the object to which a Property Set is attached. Where to go from their, or whether the data you seek is exposed in ActiveX is likely beyond my ability to help.

If you style or definition always has the same radius [or if the radius can be calculated from the conduit diameter], a manual property or two [and possibly a formula property to determine which method to use and/or do the calculation may be less ideal but more easily done.