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

property set definition

38 REPLIES 38
Reply
Message 1 of 39
Anonymous
1789 Views, 38 Replies

property set definition

Hello,

I'm trying to create a property set definition to schedule model dimensions
from a custom parametric MV Part, for example the dimension LenA1.

I have:
1) Inserted part
2) Created a new property set definition.
3) Selected object type definition.
4) Selected MV Part for applies to.
5) Set the parameter to auto.
6) Source: Tried various settings. This seems to be where I'm having
trouble. There is no size or value setting. What should I be picking for
source to retrieve the value of LenA1?

On a side note can these property set definitions be saved with the MV Part
in the catalog so that they are automatically attached to the part at
insertion?

Thanks,

Shane
38 REPLIES 38
Message 2 of 39
Anonymous
in reply to: Anonymous

I think what you want to do is attach a style based property set definition to
the style.
caution though... all object following that same style will have the same
properties.
if I am not mistakened.

B Fry wrote:

> Hello,
>
> I'm trying to create a property set definition to schedule model dimensions
> from a custom parametric MV Part, for example the dimension LenA1.
>
> I have:
> 1) Inserted part
> 2) Created a new property set definition.
> 3) Selected object type definition.
> 4) Selected MV Part for applies to.
> 5) Set the parameter to auto.
> 6) Source: Tried various settings. This seems to be where I'm having
> trouble. There is no size or value setting. What should I be picking for
> source to retrieve the value of LenA1?
>
> On a side note can these property set definitions be saved with the MV Part
> in the catalog so that they are automatically attached to the part at
> insertion?
>
> Thanks,
>
> Shane
Message 3 of 39
Anonymous
in reply to: Anonymous

Mike,

Thanks for the reply.
I have tried attaching both object & style based with no luck in retrieving
the model dimensions.

Shane



Mike Hutchinson wrote in message
news:3E834833.38E3D04B@bbsae.com...
> I think what you want to do is attach a style based property set
definition to
> the style.
Message 4 of 39
Anonymous
in reply to: Anonymous

Hi Guys -

If you can't just include this in the Part Name (which would be the easy
way). There's a trick to this, and it includes creating some custom data
that is equal to the items that you want to expose, but I need to talk to
one of the developers before I start you down the wrong path. I'll try to
post something this weekend.

jason martin
Autodesk

"B Fry" wrote in message
news:689799B652CE4A758F7C0FAD5D025A05@in.WebX.maYIadrTaRb...
> Mike,
>
> Thanks for the reply.
> I have tried attaching both object & style based with no luck in
retrieving
> the model dimensions.
>
> Shane
>
Message 5 of 39
Anonymous
in reply to: Anonymous

Hi Jason

I have about 15-20 parameter sizes and some custom parameters to schedule
per MV Part, so the Part Name would probably not be a good idea.

I never would have guessed that creating our hood catalog would be so time
consuming. I'm really looking foreword to the fan catalogs. 😉

Are there things I'm missing in the manual or do other companies not convert
their product lines to MV Parts?

Thanks,

Shane
FryCo Systems, Inc.


jason martin [Autodesk] wrote in message
news:633BC61AFCDC959500A8722B74787E96@in.WebX.maYIadrTaRb...
> Hi Guys -
>
> If you can't just include this in the Part Name (which would be the easy
> way). There's a trick to this, and it includes creating some custom data
> that is equal to the items that you want to expose, but I need to talk to
> one of the developers before I start you down the wrong path. I'll try to
> post something this weekend.
>
> jason martin
> Autodesk
>
Message 6 of 39
Anonymous
in reply to: Anonymous

Hi Shane,

I will try to help you with your property set challenge.

In Release 3 we revised the way we approach property sets and catalog data.
There is a long story behind this, but the short version is we wanted any
data to be accessible for scheduling, and to have better separation between
publishing the part data and extraction of that data once it is in a drawing
model.

LenA1 sounds like a parametric value. If you need to extract this value, you
might want to use a calc or table value equal to this parameter value using
a custom parameter, such as "Overall Length" (desc). If you do this you'll
need to give it a reasonably unique parameter name like "myLen" (name) or
something like that, because unique param name lookup can be leveraged
later.

A value like LenA1 can show up in many different use cases, and it might
represent an overall length of a part in one scenario, but be for example
cylinder length meant to be part of a pipe connection in another scenario.
So extracting LenA1 might give mixed results, while extracting "myLen" would
always be your intended value.

You can automate the population of property set data and facilitate data
extraction by matching your parameter names in a master dwg each time the
part is added to a dwg. The master dwg is "AecbPropertySetDefinitions.dwg"
and it should reside in the "Aecb Shared Content 3" folder. If this dwg
contains sample property sets which match the part style (mvPart, duct
segment, duct fitting, etc.) the application will look for matching
parameter names. If it finds property definitions with the same name as your
mvPart parameter, it will set the value in a property for later use in
scheduling.

To say it in simpler, higher level terms, if you match the mvPart parameter
name ("myLen") to a master property def using a property set that works with
mvPart styles, you can get your properties added automatically each time you
insert this part in a dwg.

This applies to all parameters for any part family. Hope this helps you
solve your problem.

Craig Storms
Software Developer
Autodesk, Inc.
Message 7 of 39
Anonymous
in reply to: Anonymous

Hi Craig,

Thanks for your response.

I'm still not quite getting it though. There is not a
"AecbPropertySetDefinitions.dwg" on my system however I did find
"AecbPropertySetDefs3.dwg" in the following folder C:\Fry_Co\Autodesk
Building Systems 3\Content\Imperial\Schedules and I assume this is the file
we are talking about. I created a new property set definition in this file
named "MvParts-HoodObject". On the applies to tab I selected applies to
entities then selected Multi-View Part on the object side of the applies to
tab. On the definition tab I selected "add". On the new property dialog that
pops up entered "HoodLength" for the name & left the start with box at
. (HoodLength is a custom parameter I created in the MvPart
parameter configuration) I checked "Automatic". Set Format to "Number -
Object(ABS)". Clicked on the Source button and selected "Custom" from the
list.

I then repeated the above procedures creating a new property set definition
in the current drawing file instead of the master definition file. This new
property set definition is identical to the one in the master file.

After creating the above definitions I inserted the MvPart. Attached
schedule data to the MvPart selecting "MvParts-HoodObject". Then when I go
to the edit schedule data dialog box the value of "HoodLength" is "False"
and not the number 48 that it was set to when inserting.

I'm obviously missing something here. Any ideas?

Sincerely,

Shane
FryCo Systems, Inc.
Message 8 of 39
Anonymous
in reply to: Anonymous

B Fry wrote in message
news:9C0D3CCB226D13B6815DF9CF0BF70B19@in.WebX.maYIadrTaRb...

>Set Format to "Number -
> Object(ABS)". Clicked on the Source button and selected "Custom" from the
> list.

O.K. I finally figured out that "Custom" is referring to the custom part
sizing tag and is the wrong choice here. I still can not figure out what to
check on the source screen and my custom parameter "HoodLength" does not
appear in the list. If I leave everything unchecked that does not work
either.

Any help would be greatly appreciated.

Sincerely

Shane
FryCo Systems, Inc.
Message 9 of 39
Anonymous
in reply to: Anonymous

Does anyone have any Ideas on this issue?

Thanks,
Shane
FryCo Systems, Inc.


"B Fry" wrote in message
news:D695AD0C5D8E0C3AB2E9E169F1783070@in.WebX.maYIadrTaRb...
>
> B Fry wrote in message
> news:9C0D3CCB226D13B6815DF9CF0BF70B19@in.WebX.maYIadrTaRb...
>
> >Set Format to "Number -
> > Object(ABS)". Clicked on the Source button and selected "Custom" from
the
> > list.
>
> O.K. I finally figured out that "Custom" is referring to the custom part
> sizing tag and is the wrong choice here. I still can not figure out what
to
> check on the source screen and my custom parameter "HoodLength" does not
> appear in the list. If I leave everything unchecked that does not work
> either.
>
> Any help would be greatly appreciated.
>
> Sincerely
>
> Shane
> FryCo Systems, Inc.
>
Message 10 of 39
Anonymous
in reply to: Anonymous

Hi Shane,

Sorry to not reply to this earlier. From reading your replies it appears
we're tracking two different issues.

First -- is the mechanism for automatic generation of property sets upon
part insertion working properly. It might be easier to test this using one
of the known parameters already configured in the part. If you open one of
our parts and look at the predefined parameters, for example any round duct,
pipe, or conduit should have a "D1" parameter, which will be a numerical
value (float or real number). Or try "LenA1" as in your previous sample
part. Either should make a good test case, provided you set up the matching
property set dwg in the shared content folder
(AecbPropertySetDefinitions.dwg in the "Aecb Shared Content 3" folder). The
file must be of this name in this location, the one you found is related but
won't work for this solution. Any new file with the correct name should
work. Also this should be a manual property, not an automatic property.

Second -- is the setup and configuration of the custom parameter in the part
family. Once you get the first item working this will not be hard. My
suggestion to treat them separately is to simplify the problem a bit and
make sure the mechanism works before we solve the problem of getting the
specific data you want populated into a property set. We can pursue this
after getting through the first issue.

I will try to take a look at this on Release 3 tonight, and document a set
of exact steps to illustrate the mechanism. I think you will find this much
easier if you have a good clear example to follow.

I will try to follow up again tonight or tomorrow.

Craig Storms
Software Developer
Autodesk, Inc.
Message 11 of 39
Anonymous
in reply to: Anonymous

Hi Craig,

I'm not sure exactly what I'm doing wrong here but following the first part
of your post I created (AecbPropertySetDefinitions.dwg in the "Aecb Shared
Content 3" folder) and added a new property set definition to it with
parameters for both "D1" & "LenA1" (manual) then I opened a test drawing
inserted a round duct and there doesn't seem to be any automatic generation
of property set data.

At this point I'm lost. Is there some documentation in the concept guide or
on-line help that I'm just missing?

Thanks for your help.

Shane,
FryCo Systems, Inc.
Message 12 of 39
Anonymous
in reply to: Anonymous

Shane,

I tested the mechanism and in doing so found some inconsistencies that may
prevent you from using this effectively.

The steps are:

1) Create an "AecbPropertySetDefinitions.dwg" file in the "Aecb Shared
Content 3" folder. Add to this dwg new property set configured to work with
the object style you wish to schedule. For example MvPart styles, or Pipe
Fitting Styles.

2) As a test case, add a manual property named "D1" and set it to type
"Real" number. This is a common parameter generally used anytime a part has
a round connection #1. So it should work for a variety of object styles. The
test case I used was for duct fitting styles. Save and close the
AecbPropertySetDefinitions.dwg file.

3) Start a new dwg and use any of the add jigs to insert parts which use
this parameter. Any of the round duct fittings should work. As you add parts
the intent is for the styles to get populated with property set data
matching your D1 entry in the AecbPropertySetDefinitions master dwg.

In testing this I found that our newer content worked as expected, but our
older content did not. I have logged this as a defect and will look into it
further. I will also pursue alternative solutions which may help you get
what you need into your dwgs.

Craig Storms
Software Developer
Autodesk, Inc
Message 13 of 39
Anonymous
in reply to: Anonymous

Shane,

Seems we may have posted messages around the same time ... here's my last
reply again, which unfortunately calls attention to a defect that may limit
or prevent you from using this to effectively. I am looking into it further.
and will post additional info in the next day or so.

Craig Storms
Software Developer
Autodesk, Inc

------------------------------------------------------------------------

The steps are:

1) Create an "AecbPropertySetDefinitions.dwg" file in the "Aecb Shared
Content 3" folder. Add to this dwg new property set configured to work with
the object style you wish to schedule. For example MvPart styles, or Pipe
Fitting Styles.

2) As a test case, add a manual property named "D1" and set it to type
"Real" number. This is a common parameter generally used anytime a part has
a round connection #1. So it should work for a variety of object styles. The
test case I used was for duct fitting styles. Save and close the
AecbPropertySetDefinitions.dwg file.

3) Start a new dwg and use any of the add jigs to insert parts which use
this parameter. Any of the round duct fittings should work. As you add parts
the intent is for the styles to get populated with property set data
matching your D1 entry in the AecbPropertySetDefinitions master dwg.

In testing this I found that our newer content worked as expected, but our
older content did not. I have logged this as a defect and will look into it
further. I will also pursue alternative solutions which may help you get
what you need into your dwgs.
Message 14 of 39
Anonymous
in reply to: Anonymous

Craig,

First of all I would like to say thank you for all your help.

I have been able to get my property set defs. working after a fashion. There
seems to be a few problems with them but the problems are not
insurmountable. I am able to work around them for the most part. The
problems I noticed are as follows:

1) To use the prop. set defs. with my custom MVParts I put the prop. set
def. in the AecbPropertySetDefinitions master dwg then I have to insert the
def. into the drawing that I am going to insert the parts into prior to
inserting the parts. This procedure will allow the prop set to populate on
the subsequent insertion of custom parts. (I do not have to insert the prop
set def into the drawing on the standard parts that I have tried.) Is this
behavior as designed?

2) When I select a custom part that has been populated as above then rt.
click and select edit schedule data nothing appears in the dialog box. If I
select browse prop. set defs off of the documentation menu I can then select
the same part from the tree on the left and then select edit to edit the
properties that were populated. It seems strange that I can not do this with
the context menu. Is this because the prop set def is style based & not
object based?

3) If I delete a part that is populated as described above I have to do a
building systems purge to make the populated properties disappear from the
browse prop set defs window mentioned in # 2 above. Is this normal or should
they disappear with the deleted part?

As I mentioned above none of this is insurmountable it just took some trial
and error to figure out.

Shane,

FryCo Systems, Inc.
Message 15 of 39
Anonymous
in reply to: Anonymous

Hi Craig,

I am reposting this as I'm not sure it went through on the 7th. Can you tell
me if the following observations are expected behavior?

Thanks,

Shane Fry
FryCo Systems, Inc.

-------------------------------------------------
Craig,

First of all I would like to say thank you for all your help.

I have been able to get my property set defs. working after a fashion. There
seems to be a few problems with them but the problems are not
insurmountable. I am able to work around them for the most part. The
problems I noticed are as follows:

1) To use the prop. set defs. with my custom MVParts I put the prop. set
def. in the AecbPropertySetDefinitions master dwg then I have to insert the
def. into the drawing that I am going to insert the parts into prior to
inserting the parts. This procedure will allow the prop set to populate on
the subsequent insertion of custom parts. (I do not have to insert the prop
set def into the drawing on the standard parts that I have tried.) Is this
behavior as designed?

2) When I select a custom part that has been populated as above then rt.
click and select edit schedule data nothing appears in the dialog box. If I
select browse prop. set defs off of the documentation menu I can then select
the same part from the tree on the left and then select edit to edit the
properties that were populated. It seems strange that I can not do this with
the context menu. Is this because the prop set def is style based & not
object based?

3) If I delete a part that is populated as described above I have to do a
building systems purge to make the populated properties disappear from the
browse prop set defs window mentioned in # 2 above. Is this normal or should
they disappear with the deleted part?

As I mentioned above none of this is insurmountable it just took some trial
and error to figure out.

Shane,

FryCo Systems, Inc.
Message 16 of 39
Anonymous
in reply to: Anonymous

Can anyone take a look at this message and tell me if this is normal
"expected" behavior?
This message was posted on 04/07/03.

Thanks,
Shane

"B Fry" wrote in message
news:AD25A036576886080D1E067B2EC648CD@in.WebX.maYIadrTaRb...
> Craig,
>
> First of all I would like to say thank you for all your help.
>
> I have been able to get my property set defs. working after a fashion.
There
> seems to be a few problems with them but the problems are not
> insurmountable. I am able to work around them for the most part. The
> problems I noticed are as follows:
>
> 1) To use the prop. set defs. with my custom MVParts I put the prop. set
> def. in the AecbPropertySetDefinitions master dwg then I have to insert
the
> def. into the drawing that I am going to insert the parts into prior to
> inserting the parts. This procedure will allow the prop set to populate on
> the subsequent insertion of custom parts. (I do not have to insert the
prop
> set def into the drawing on the standard parts that I have tried.) Is this
> behavior as designed?
>
> 2) When I select a custom part that has been populated as above then rt.
> click and select edit schedule data nothing appears in the dialog box. If
I
> select browse prop. set defs off of the documentation menu I can then
select
> the same part from the tree on the left and then select edit to edit the
> properties that were populated. It seems strange that I can not do this
with
> the context menu. Is this because the prop set def is style based & not
> object based?
>
> 3) If I delete a part that is populated as described above I have to do a
> building systems purge to make the populated properties disappear from the
> browse prop set defs window mentioned in # 2 above. Is this normal or
should
> they disappear with the deleted part?
>
> As I mentioned above none of this is insurmountable it just took some
trial
> and error to figure out.
>
> Shane,
>
> FryCo Systems, Inc.
>
>
Message 17 of 39
NotFromFrance
in reply to: Anonymous

I know this thread isn't still active, but were you able to get the property set to automatically be inserted with the part?  I need to add the custom property, "Weight", to all MEP parts in the catalog and access the property value for each part inserted in a drawing using vba, but I'm stuck.

Message 18 of 39
Keith.Brown
in reply to: NotFromFrance

If your using VBA then there really isnt need to access a property set.  You can access the part directly.  I do not know VBA but if i was doing it in .net C# i would try to get the value from the object using something like.

 

        internal static bool TryGetValueDouble(Member member, string key, ref double value)
        {
            using (var partData = PartManager.GetPartData(member))
            {
                try
                {
                    DataField field = partData.FindByName(key, false);
                    value = field.ValueDouble;
                    field.Dispose();
                    return true;
                }
                catch
                {
                    return false;
                }
            }

        }

 

Message 19 of 39
NotFromFrance
in reply to: Keith.Brown

I don't have the "PartManager" object or "GetPartData" method as an option in vba.  Should I give up and just download Visual Studio Express, or do I keep trying with VBA?

extended data.JPG

 

 

The section of code below can work if the value was in a "Property Set" but not "Property Set From Style".  Your route of looking at the part would work but what if the cad user had to change the value for the Weight for a single instance of a part?  For example, we don't always create a new custom part if we can just throw in an existing one to save time.

 

Dim SchedApp As New AecScheduleApplication
Dim cPropSets As AecSchedulePropertySets
Dim propSet As AecSchedulePropertySet
Dim cProps As AecScheduleProperties
Dim prop1 As AecScheduleProperty
Dim Weight As Double


    If currentobject.Type = "Valve" Then
        Set cPropSets = SchedApp.PropertySets(currentobject)
        Set propSet = cPropSets.Item("MvPartValveStyles")

        Set cProps = propSet.Properties

        For Each prop1 In cProps
            If prop1.Name = "Weight" Then
                Weight = prop1.Value
            End If
        Next
   

Message 20 of 39
VitalyF
in reply to: NotFromFrance

Hi,

 

This problem can be solved with the help VBScript with "Formula Definition"

 

RESULT="--"
On Error Resume Next
Set app = GetObject (,"AutoCAD.Application")
Set sched = app.GetInterfaceObject("AecX.AecScheduleApplication.7.7")

vo = [WeightObj]
valvPropSet = "MvPartValveStyles"
Set vobj = app.ActiveDocument.ObjectIDtoobject ( [ObjectID] )
set style = vobj.Style
set propSets = sched.PropertySets(style)
For Each propSet In propSets
if propSet.Name = valvPropSet Then
For Each prop In propSet.Properties
If prop.Name = "SupplierName" Then
If vo <> "0" Then
RESULT = vo
Else RESULT = prop.Value
End If
End If
Next
End If
Next

 

  

If the value "WeightObj" = 0 then insert the value from the catalog, else from object

 

ValveWeight.gif

 

This is what you want?

 

Vitaly

 

PS

instead "SupplierName" type value of your catalog

 

 

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

Post to forums  

Autodesk Design & Make Report

”Boost