Modify Parameter via API

All topics about specific development with COM interface, LIP language, API in VB, ...

Moderators: remi77, jacs, Daniel

User avatar
flavio_ruivo
Master Corporal
Master Corporal
Posts: 32
Joined: Thu Mar 01, 2007 12:09 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6
Location: Leiria-Portugal
Contact:

Modify Parameter via API

Unread post 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
Best Regards,
Flávio Ruivo
GMP Marcatto
Private First Class
Private First Class
Posts: 13
Joined: Mon May 25, 2015 4:02 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.25

Re: Modify Parameter via API

Unread post 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?
Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.26
Location: The netherlands
Contact:

Re: Modify Parameter via API

Unread post by Mark Oostveen »

TopSolid V6 of V7 is not a big difference in This case .
GMP Marcatto
Private First Class
Private First Class
Posts: 13
Joined: Mon May 25, 2015 4:02 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.25

Re: Modify Parameter via API

Unread post by GMP Marcatto »

just said because i never had used 7.6
User avatar
flavio_ruivo
Master Corporal
Master Corporal
Posts: 32
Joined: Thu Mar 01, 2007 12:09 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.6
Location: Leiria-Portugal
Contact:

Re: Modify Parameter via API

Unread post 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
Best Regards,
Flávio Ruivo
GMP Marcatto
Private First Class
Private First Class
Posts: 13
Joined: Mon May 25, 2015 4:02 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.25

Re: Modify Parameter via API

Unread post 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:
Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.26
Location: The netherlands
Contact:

Re: Modify Parameter via API

Unread post 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. [emoji15]

Good luck with your work.
Post Reply