Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PrimarySizeCriterion bug

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
MarryTookMyCoffe
507 Views, 3 Replies

PrimarySizeCriterion bug

so I create my own pipe type, I have segmenst from 10 to 500. When i try to set it up with size Criterion it fail. for some reason min and max is not saved in class minimum stay null I try to psc.MinimumSize = 10; and still nothing

                            RoutingPreferenceRule option = new RoutingPreferenceRule(pipeSegment.Id, segmentName);
                            
                            PrimarySizeCriterion psc = new PrimarySizeCriterion(10, 500);
                            TaskDialog.Show("", psc.MinimumSize.ToString());
                            if(psc.IsValidObject)
                            {
                            option.AddCriterion(psc);
pipeType.RoutingPreferenceManager.AddRule(RoutingPreferenceRuleGroupType.Segments, option, 0);
                            }
                            

 

 

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug
3 REPLIES 3
Message 2 of 4

nvm i thing i figure it out

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug
Message 3 of 4
Anonymous
in reply to: MarryTookMyCoffe

I am trying to also set the PrimarySizeCriterion, what is it that you did that worked? The docs don't really say how to use this. 

Message 4 of 4
MarryTookMyCoffe
in reply to: Anonymous

If I remember correctly I forget to change value to a feet, there is a max cap on what size there can be.
That was very noobie mistake 😄
Documentation is not very good on it so, be ready on making a lot of debuging.

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug

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

Post to forums  

Rail Community


Autodesk Design & Make Report