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

Filtering script for "approval status"

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Masibanda-CE
845 Views, 8 Replies

Filtering script for "approval status"

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!!

8 REPLIES 8
Message 2 of 9

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

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

Message 3 of 9

Hi @Masibanda-CE 

 

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:

  • "What obj ?" --> The “Obj” parameter of the Function checkElement(Obj) is actually the object that Advance Steel passes for checking. As example: the beam, or weld, or MainPart.
  • When use it in the DSM, it refers to the specific model object from drawing style.
  • The script works like a filter and it returns True or False (like ON / OFF). It inquiries the object for a specific condition and returns the result. 
  • As example, your script tests if the object has the material "304". So, a filter like that will return True only for objects with the material "304".

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



Emy Nestor
Message 4 of 9


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

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

Message 5 of 9

Hi @Sebastian_Eiche 

Interesting.
Could you please share how you use the User Attributes in a script for DSM / DPM ?

Thank you
Emy



Emy Nestor
Message 6 of 9

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

EESignature

If this information was helpful, please use the Accept as Solution function, this make it easier for other users

Message 7 of 9

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



Emy Nestor
Message 8 of 9

@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

Message 9 of 9

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.

Post to forums  

Autodesk Design & Make Report