Could someone give me insight into the purpose and use of each type in the list of available types for a New Parameter? Why you would use one type over another?
The ones list are within on part on my machine are:
Conditional Test 1
Custom Data 1
Engineering Part ID 5
Gauge
Material
Part Dimension 1
Part Size Validation Test 3
Part Source URL
Static Pressure At Object
Supplier Name
Total Pressure At Object
Velocity Pressure At Object
Some of the groups are just there for logical grouping and for program access. You can certainly use custom data for most everything that you add but the others are predifined for you. The conditional test is used when invoking the pfadvanced command in content builder. Supplier Name and Part Source URL are self explanitory. The numbers behind the name auto increment. For instance, in the list that you gave, you already have 4 Engineering Part ID's in your part already. The next available one is Part ID 5.
If you do any programming in .net, the group that parameter belongs to is important in accessing the information.
Hello,
I would like to go little further here.
Can i use Custom Data for adding some extra information (for example numbers from catalogue etc) that i can later see in shedule? If yes, how can i get into this data when the MvPart is in the drawing. I dont see it in the extended data. I think i should somehow see it in the property set definitions?
When you create the custom data you need to make sure that its visibility is turned on. Once that happens you will see the custom data in the style property set as shown in the picture below.
One thing that i never liked about MEP is that it places all of the mvpart property sets into different style based property sets. This makes it difficult to schedule multiple types of objects in one schedule because they each have a different style property set name. To get around this issue you can follow the instructions at the link below to transfer the style based property set defintions to a object based property set.
This will allow you to schedule all mvparts into a single schedule if you desire. You should probably pay attention to the note at the bottom of the post that mentions all users should be using the exact same mvparts in order for this to work smoothly.
Hello,
Thank you for answering. It helped. But then it comes to what you mentioned that its not possible to make one shedule for all elbows, t-pieces, reductions etc.
I have read all the topic that you mentioned. I must say i dont have much experience in programming. Actually i even dont know how to use the tips mentioned there.
So is there a way i can do it somehow? Maybe a small manual like:
1) open this file
2) copy and paste part of the code
3) compile...
etc etc etc
Or should i drop it and try to put all the neccesary information into the Name column for example. It will not look nice but it will work more or less.
Hello again,
Ok, so i copied the last code from the link you mentioned. I compiled it in vba editor. I actually had to add these lines below so it was compiled succesful. Not sure if anything more should be added?
Dim WeightOverride As Double
Dim ObjectID As Double
So the full code looks like that:
Dim WeightOverride As Double
Dim ObjectID As Double
Sub ExtraParameter()
On Error Resume Next
Set app = GetObject(, "AutoCAD.Application")
acadVerString = app.ActiveDocument.GetVariable("ACADVER")
'Set MEP application string, based on version running:
Select Case acadVerString
Case "18.0s (LMS Tech)" 'MEP-2010
aecBaseVer = "AecX.AecScheduleApplication.7.0"
Case "18.1s (LMS Tech)" 'MEP-2011
aecBaseVer = "AecX.AecScheduleApplication.7.0"
Case "18.2s (LMS Tech)" 'MEP-2012
aecBaseVer = "AecX.AecScheduleApplication.7.0"
Case "19.0s (LMS Tech)" 'MEP-2013
aecBaseVer = "AecX.AecScheduleApplication.7.0"
Case "19.1s (LMS Tech)" 'MEP-2014
aecBaseVer = "AecX.AecScheduleApplication.7.5"
Case "20.0s (LMS Tech)" 'MEP-2015
aecBaseVer = "AecX.AecScheduleApplication.7.7"
Case Else
aecBaseVer = "Unknown"
End Select
If aecBaseVer = "Unknown" Then
RESULT = "Unknown MEP Version"
Else
RESULT = " ** Unable to get property value from style **"
Override = [WeightOverride]
Set sched = app.GetInterfaceObject(aecBaseVer)
Set mepObject = app.ActiveDocument.ObjectIdToObject([ObjectID])
multiplier = 1
partStyle = "[PartType]"
If mepObject.ObjectName = "AecbDbMvPart" Then
stylePropertySetName = "MvPart" + Replace(partStyle, " ", "_") + "Styles"
End If
If mepObject.ObjectName = "AecbDbPipe" Then
stylePropertySetName = "PipeStyles"
multiplier = mepObject.CutLength
End If
If mepObject.ObjectName = "AecbDbPipeFitting" Then
stylePropertySetName = "PipeFitting" + Replace(partStyle, " ", "_") + "Styles"
End If
partPropertySet = UCase(stylePropertySetName)
Set style = mepObject.style
Set propSets = sched.PropertySets(style)
For Each propertySet In propSets
If UCase(propSet.Name) = partPropertySet Then
For Each prop In propertySet.Properties
If UCase(prop.Name) = "WEIGHT" Then
If Override <> 0 Then
RESULT = Override
Else
RESULT = prop.Value * multiplier
End If
End If
Next
End If
Next
End If
End Sub
Then i loaded the ExtraParameter.dbv file into the drawing without problems.
I opened the elbow that i created, i added the WEIGHT parameter (to stick to the example). Its visible i can see it but only in the PipeFittingElbowStyles so nothing new happened. Probably i miss here some things. Or maybe im checking in wrong place?
Any help?
Actually it would be great addition to sheduling, especcialy for making the lists of parts ready to be sent to supliers. Dont know why developers didnt think about such idea and it must be so hard to get there.