I might be overthinking this but, I want to create a GA drawing style where objects are represented differently based on their "Approval status". I am assuming that I'll need to write a filtering script that can then be applied with a "Model object filter".
Does anyone know how to test for the value of the "approval stats" in a script? My simple Material script is below ... what obj.?????? should I be looking for and will it return text or a number?
'Check for material of 304
Function checkElement(Obj)
checkElement = False
Mat = obj.Material
If mat = "304" Then
checkElement = True
End If
End Function
Thanks!!
Solved! Go to Solution.
Solved by Masibanda-CE. Go to Solution.
Solved by Emanuel.Nestor. Go to Solution.
I'm not sure if this status could be get by the VB script. I tried a few things, but could not find it (which not mean it's not possible).
Meanwhile I would transfer the Approval status to another userattribute and would use this for the filter.
Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph
If this information was helpful, please use the Accept as Solution function, this make it easier for other users
Thank you for posting on Advance Steel forum.
Interesting topic 🙂
I am not sure exactly where you want to use the script: in Drawing Style Manager (DSM) - Model Object Filter, or in Drawing Process Manager - Scripts for Detail Style Map.
However, here are some answers and info:
Regarding "Approval status": currently it is not included in the list of available properties to be used via script.
Similar for "User Attributes". Sorry about that.
If you would like to know more about scripts, here is a link to a very good documentation from Autodesk University:
Hope it is helpful for you.
Please let me know if there is anything else I could help you with in this topic.
Best regards,
Emy
Similar for "User Attributes". Sorry about that.
Best regards,
Emy
not sure if we talk about the same...UserAttribute are definitely working
Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph
If this information was helpful, please use the Accept as Solution function, this make it easier for other users
Interesting.
Could you please share how you use the User Attributes in a script for DSM / DPM ?
Thank you
Emy
I create own modelobjects with the QualifierFilter, but this is working in all other instances
Function checkElement(Obj)
checkElement = False
var=obj.UserAttribute(1) 'getting the Attribute: remember the programming guy start with "0" so if you put here a "1" it's userattribute2 =)
'msgbox var if you want to test the result, delete the '
If var ="ExampleTxt" Then
checkElement = True
Else
checkElement = False
End If
End Function
Sebastian Eiche
Application Engineer @Mensch und Maschine acadGraph
If this information was helpful, please use the Accept as Solution function, this make it easier for other users
Thank you, @Sebastian_Eiche 🙂
I just checked the drawing process with the below script and it worked fine 🙂
'Script to filter by specific UserAttribute 1 value
Function checkElement(Obj)
bValid = False
Attrib1 = Obj.UserAttribute(0)
If Attrib1 = "..desired string.." Then
bValid = True
End If
checkElement = bValid
End Function
No function for ApprovalStatus ...
Best regards,
Emy
@Emanuel.Nestor Thanks Emy. I have a working knowledge of scripts, I just couldn't find the property containing "status" values. So you're telling me it's not accessible, why?! Why is so much of the data that is allowed to be entered into the application not accessible ... or only accessible under certain conditions? It's extremely disappointing. I seem to be met with this response from ADSK frequently.
Pretty much any application can create Details for Steel Shops, It's not that hard to spit out drawings and a few reports. The job of a Detailer is much more than that. We are constantly responding to last-minute demands, requests, changing goals, and timeframes. Manipulating data and communication is core to what we do.
I basically stopped using Tekla 4 years ago to give AS a run because it seemed like a no-brainer for the price. Over a 10 year period, a limited license of Tekla will have cost 10k over that of AS but it's become increasingly apparent it is costing me much more than that in extra labour, customer ill will, and lost opportunities. Even when compared to a full license of Tekla the extra cost increases to 40k but even then I still see it as a more financial attractive situation. To coin a phrase "quality is remembered long after price is forgotten".
I'm going to continue to keep 1 license of AS, because we have a customer that requires it but when our subscription runs out I'm dropping the other. We're in the position to add 2 more stations and it's going to be Tekla.
I'm not trying to be threatening or argumentative, just letting you know my position ... and I don't think I'm alone. I believe ADSK needs to take a serious look into their strategy for AS.
As always thanks for your input Emy, it's always well received.
Cheers,
Gary
Hello everyone,
I have a general question about creating scripts for drawing styles.
Is there an overview of all the variables that I can query from my model and program a filter for?
And it would be helpful to see the structure of an SQL query in this context in order to understand how to program it.
I would be happy if there was something like that.
Ralf Hoffknecht
Software Technical Specialist AEC @Graitec Innovation GmbH
Autodesk Certified Professionall
Can't find what you're looking for? Ask the community or share your knowledge.