column base offset parameter retrieves null

column base offset parameter retrieves null

khalidfathyuar
Contributor Contributor
321 Views
2 Replies
Message 1 of 3

column base offset parameter retrieves null

khalidfathyuar
Contributor
Contributor

i have an error when i'm trying to get the column base offset instance parameter it gives me error i tried to use built in parameter Enum and i tried to use look up parameter and both give me error although the storage type is double as i checked in revit look up tool   as iam trying to give it offset  


foreach (var columnid in columnsid)
{
Element column =Doc.GetElement(columnid);

var parameterbaseoffset =
column.LookupParameter("Base Offset").AsDouble();

//parameterbaseoofset.Set(offset);
}

@jeremytammik   

@mikako_harada 

@didik.achmadiSQCG4 

@vincebohner 

Accepted solutions (1)
322 Views
2 Replies
Replies (2)
Message 2 of 3

RPTHOMAS108
Mentor
Mentor
Accepted solution

You should avoid using LookupParameter for parameters that are built-in or shared since the name of the parameter alone does not distinguish it.

 

In your case you can use:

BuiltInParameter.FAMILY_BASE_LEVEL_OFFSET_PARAM

 

There is another one of the same name called:

SCHEDULE_BASE_LEVEL_OFFSET_PARAM

Message 3 of 3

khalidfathyuar
Contributor
Contributor

Thank you it works now@RPTHOMAS108  

0 Likes