Page 1 of 1

Modify Parameter via API

Posted: Thu Jul 16, 2015 6:09 pm
by flavio_ruivo
Hi,

How can I modify the value of the parameter "@9999" (or any other one that i know the identifier) via API or LIP ?

Best Regards,
Flávio Ruivo

Re: Modify Parameter via API

Posted: Fri Jul 17, 2015 4:57 pm
by GMP Marcatto
is this TopSolid7?

if yes, then:

DocumentId Template_DocId = new DocumentId("your document ID");
ElementId element = TopSolidHost.Elements.SearchByName(docId, name);
TopSolidHost.Parameters.SetTextValue(element, "text");

are you brazilian too?

Re: Modify Parameter via API

Posted: Fri Jul 17, 2015 6:53 pm
by Mark Oostveen
TopSolid V6 of V7 is not a big difference in This case .

Re: Modify Parameter via API

Posted: Fri Jul 17, 2015 7:00 pm
by GMP Marcatto
just said because i never had used 7.6

Re: Modify Parameter via API

Posted: Fri Jul 17, 2015 7:04 pm
by flavio_ruivo
Hi all,

Is in V6. I find the way to set the paramater with the Idenfifier (@)

N_Ident, is my Identifier that I already get the code.
V_Valor, the value that I want.

TopDoc.Parameters("@" & System.Convert.ToString(N_Ident)).SetConvertedValue(V_Valor,"mm")


Best Regards,
Flávio Ruivo

Re: Modify Parameter via API

Posted: Fri Jul 17, 2015 7:19 pm
by GMP Marcatto
lol, i think is a kind different...

i didnt find a way like u described

TopSolidHost.Parameters.SetTextValue(ElementId inElementId, string inValue)
not document.parameters :cry: :cry:

Re: Modify Parameter via API

Posted: Fri Jul 17, 2015 8:07 pm
by Mark Oostveen
Hmm, you are correct the difference between V6.x and V7.x is larger indeed. It is a while ago since I last used both API.

Good luck with your work.