Model Object - custom filtering

Model Object - custom filtering

flyplacek
Contributor Contributor
3,470 Views
26 Replies
Message 1 of 27

Model Object - custom filtering

flyplacek
Contributor
Contributor

Hi!

Is there any way to set up new filter for defining model objects?

 

model object.PNG

 

I would like to create separate dimension lines for each hole size. I suppose the key to that is defining model object definition for each hole diameter but it is not possible to filter them by size..

And another question - is there any way to add a label to dimension line with diameter of the hole?

plate.PNG

Thanks for any help!

Accepted solutions (2)
3,471 Views
26 Replies
Replies (26)
Message 2 of 27

stephan.gumpert
Autodesk
Autodesk

Yes this is possible, you need to use a script together to filter the Model Objects.

 

Let me find an example.

Message 3 of 27

stephan.gumpert
Autodesk
Autodesk
Accepted solution

Here is a screen shot of the Table you need to edit.

You could need to create a script for each holes size then create a model object for Hole and the particular scripts that you have created.

i.e.

Hole Model Object -8mm Script

Hole Model Object -10mm Script

etc

Object Filter Script.pngAn example would be:
Script Example.png

Message 4 of 27

Sebastian_Eiche
Mentor
Mentor

As @stephan.gumpert wrote, you have to add a few extra lines in the DetObjQualifierFilter Table
For these filters, the easiest way is to create a new line in the management tool. But the script text is better to paste in the Microsoft Server Management Studio. If you paste your script in the Advance Management Tools, this is often not working.

You have to create a filter for each hole diameter, or you decide to make a few selected ones for example 16,20,24,27mm and the rest is summarize in one dimension line. 
In the detail style manager, you could add a text before, after or in the middle of each dimension,
so the result could be like this:

 

 

holes.jpgBe careful with these filters 😃

And for those who read this: this filters are located in the database AstorDetailsBase, this is not merged in past (the migrate of AS2019 work--Thanks for this to Autodesk).
So if you work with an older version, you had to merge them by copy and paste in the new databases.


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 27

flyplacek
Contributor
Contributor

Thank you for your great tips! I will try it in couple of days!

0 Likes
Message 6 of 27

flyplacek
Contributor
Contributor
Accepted solution

Thank you for your tips - helped me a lot!

However your script haven't worked for me - I think it is just filtering beams & plates so it gives objects that have those kind of holes (features) - not holes themselves to be dimensioned. 

I have modified a bit your script and it works well now.

 

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Returns true for holes with a diameter of 18mm
Function checkElement(Obj)
bValid = False
'Verify only for holes
If Obj.IsKindOf(kHoleFeat) = True then
'Check what the diameter
if Obj.HoleDiameter = 18 then
bValid = True
else
bValid = False
end if
End If
checkElement = bValid
End Function

Message 7 of 27

stephan.gumpert
Autodesk
Autodesk
I am glad to be of assistance.
Stephan
0 Likes
Message 8 of 27

kevinyip888
Participant
Participant

Hello,

 

How so you think this would work if we had the same sized holes on either side of the plate, but at different positions?

 

If we wanted to dimension each side separately, we would have to tell AS which side of the plate the holes are on. It would be possible if we define the model object as the plate, and use 'holes in the objects' as the point type selection. We could then select 'bottom' or 'top' from the point position relative to object center to differentiate between the holes either side of the plate. 

 

This is not possible if we define the model object as the holes.

 

Kind Regards,

Kevin

0 Likes
Message 9 of 27

Sebastian_Eiche
Mentor
Mentor

I'm not in the office for doing some pics, but as I understand, you will not need a filter for that. Because it's implemented to create dimensions for elements which are in specific locations. This could be done in the dimension rule itself. 


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

0 Likes
Message 10 of 27

kevinyip888
Participant
Participant

Hi Sebastian,

 

I am unsure what you mean by this, any images/explanation when possible would be much appreciated. 

 

Another issue I have found, is that when I try and dimension the different hole sizes separately on my model, it only works when I define the hole sizes separately in the object presentation. As you can see below, in the first pair of screenshots, I define all holes to be visible with their symbol. When dimensioning, all holes are combined together. 

 

kevinyip888_3-1671984176792.png

kevinyip888_4-1671984316748.png

 

In the second pair of screenshots below, you can see I define the different hole sizes to be visible separately. When dimensioning, the desired outcome is achieved. 

 

kevinyip888_1-1671984078533.png

kevinyip888_0-1671984045380.png

 

Is there a reason this happens, as it would be much easier if you could define the object presentation of all bolts and then dimension as required.

 

Thank you for your time.

 

Kind regards,

Kevin

 

0 Likes
Message 11 of 27

Sebastian_Eiche
Mentor
Mentor

Sorry for being a bit rude, but are you sure you know what you're doing there?

If you want to create different dimension, you don't need different different visibility rules. You had to define different dimension rules. All holes could have the same view style: visible hidden symbol.

 

But you need new add a dimension rule for every new filtered object.

https://youtu.be/1ZLawhq3hB0

 

What you're doing is a very deep customization and therefore you should know what you're doing 

 


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

0 Likes
Message 12 of 27

kevinyip888
Participant
Participant

Hi Sebastian,

 

I have set up separate dimension chains for the 14 and 10dia holes as shown below. These rules are in place for both cases I mentioned earlier in the thread. However, only when I define the object presentation for the 10 and 14 dia holes separately, do I get the required result. If I do not define them separately, the holes are all dimensioned together regardless of diameter size. 

 

kevinyip888_0-1672007495255.png

kevinyip888_1-1672007521788.png

 

Any advice would be appreciated, as I do not know why defining a single object presentation for all bolts does not work. As you say, I have set up separate dimension requests for each dia hole, so it should work. 

 

Kind Regards,

Kevin

0 Likes
Message 13 of 27

Sebastian_Eiche
Mentor
Mentor

You are correct in defining each line for each diameter...it will not work if you combine them.

And if you now double click on the line, you will get to the point where you could define the location of the points. These could bet set for example only for points on the left side of the object.


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

0 Likes
Message 14 of 27

Sebastian_Eiche
Mentor
Mentor

What you're looking for is the dim point position:

Sebastian_Eiche_0-1672052972601.png

 


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

0 Likes
Message 15 of 27

kevinyip888
Participant
Participant

Hi Sebastian,

 

As I understand it, the dim point position would only be useful if we were to define the plate/beam as the object. We would then be able to differentiate between holes at the top/bottom of the plate/beam. However, if we define the holes as the object, we are not able to do this, as we cannot differentiate between top/bottom of an object. This is point I was asking about in my original post. 

 

Also, this does not help my question regarding the 10 and 14 dia holes because the holes are on the same side of the column, so it would not be possible to differentiate between them using dim point position. In any case, this would require defining the column as the model object, but if I wanted to differentiate between the holes diameters, the holes have to be set as the model object. 

 

I have tried testing this again, but cannot get the desired result unless I define the presentation for the 10 and 14 dia holes separately. Something is not right but I cannot find out what.

 

Kind Regards,

Kevin

0 Likes
Message 16 of 27

Sebastian_Eiche
Mentor
Mentor

Maybe we misunderstood each other, but if you want to have different dimension lines for 14mm (as example) for the left and right side of a column you will need 2 rules for it.

Rule 1: holes 14 left (with the object filter for 14mm and in the rule you need to set the points for left side)

Rule 2: holes right (same object filter but the points need to be set to the right side)

 

Therefore you will have to create new rules.

And if this will not clarify for it for you, you maybe should create some pics or a video what you want to achieve or someone other could answer your question.


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

0 Likes
Message 17 of 27

kevinyip888
Participant
Participant

Hi Sebastian,

 

I understand how to dimension holes on either side of the column now, thank you. 

 

However, my issue still persists with the fact that I cannot dimension the 14 and 10 dia holes separately unless I define them separately in the object presentation. 

 

The following three screenshots show my dimension chains, where I use separate definitions for the 14 and 10 dia holes. Using this I would expect that the 10 and 14 dia holes would be dimensioned with separate chains. 

kevinyip888_8-1672063144488.png

 

kevinyip888_5-1672062807269.png

kevinyip888_4-1672062781938.png

 

 

The following pair of screenshots show I define all holes with a single presentation rule. Doing this results in the 10 and 14 dia holes being dimensioned in a single chain. 

 

kevinyip888_0-1672062512986.png

 

kevinyip888_1-1672062638300.png

 

The next pair of screenshots show that I define the object presentation of the 14 and 10 dia holes separately. The resulting dimensions are then what is desired, with separate dimension chains for the 10 and 14 dia holes. 

 

kevinyip888_6-1672062958475.png

kevinyip888_7-1672062982634.png

 

My question is why does this happen? Why am I not able to achieve the desired result defining the object presentation of all holes? The dim point position would be of no use, as the holes are on the same side of the column. 

 

Kind regards,

Kevin

 

 

 

0 Likes
Message 18 of 27

Sebastian_Eiche
Mentor
Mentor

For this I had to try it on my system and to be honest...not in my holidays 😁 


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

0 Likes
Message 19 of 27

kevinyip888
Participant
Participant

Hi Sebastian,

 

I have tried testing this on a simple beam, as you can see below the issue still persists, it combines the two hole sizes into one chain. If you could test when you are back from holiday it would be much appreciated as it does not make sense. 

 

kevinyip888_1-1672067806423.png

 

Kind Regards,

Kevin

 

0 Likes
Message 20 of 27

kevinyip888
Participant
Participant

@acbsdesign 

 

Hi, the above issue in message 17 is also a strange issue I have encountered during this project. I was wondering if you had any idea why the issue occurs?

 

Kind Regards,

Kevin

0 Likes