Community
So the custom parameters exist, are spelled correctly and etc... What is strange is that one of them I am able to set but the rest I can not via the API... Any ideas on why this is not working?
ViewSheet v = null;
v = ViewSheet.Create(doc, titleblockid);
v.Name = s.sheetTitle;
v.SheetNumber = s.sheetNumber;
Parameter p = null;
// DOES NOT WORK
p = v.LookupParameter("SHEET DISCIPLINE");
if (!p.SetValueString("turkey"))
TaskDialog.Show("Error", "Failed to set discipline param");
// WORKS
p = v.LookupParameter("SHEET SORT CATEGORY");
if (!p.Set(123456))
TaskDialog.Show("Error", "Failed to set sort category param");
// DOES NOT WORK
p = v.LookupParameter("SHEET USE");
if (!p.SetValueString("Lamb"))
TaskDialog.Show("Error", "Failed to set use param");
// DOES NOT WORK
p = v.LookupParameter("SHEET SORT CODE");
if (!p.SetValueString("chicken"))
TaskDialog.Show("Error", "Failed to set sort code param");
Solved! Go to Solution.
Solved by RPTHOMAS108. Go to Solution.
SetValueString is for setting value types e.g. 5' - 10 1/4"
I would put the above imperial units in quote marks but that would just be confusing.
The one that works uses 'Set'.
Ahh thank you!
Can't find what you're looking for? Ask the community or share your knowledge.