Get Part Parameters from CAM document

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

Moderators: remi77, jacs, Daniel

User avatar
Rubenpmo
Private
Private
Posts: 4
Joined: Tue Jan 21, 2014 8:15 pm

Get Part Parameters from CAM document

Unread post by Rubenpmo »

Hi,

I'm trying to get the parameters from the part of a cam document, but without success.

From TopSolid'Cam Automation Guide we have:

Code: Select all

List<ParameterId> parametersPart = TopSolidCamHost.Parameters.GetParameters(TopSolidCamHost.Operations.GetPart(op));
But this isn't possible because the GetParameters method is expecting an ElementExId and the GetPart method retreives an ElementId...

So, I was trying like this:

Code: Select all

ElementExId part = new ElementExId(TopSolidCamHost.Operations.GetPart(op));
List<ParameterId> parametersPart = TopSolidCamHost.Parameters.GetParameters(part);
But it throws an exception:
Element is not parameters provider
Any other way? I need the FinishXMax, FinishXMin ...

Best Regards
Rúben Oliveira
Last edited by Rubenpmo on Wed Aug 24, 2016 7:14 pm, edited 1 time in total.
User avatar
Rubenpmo
Private
Private
Posts: 4
Joined: Tue Jan 21, 2014 8:15 pm

Re: Get Part Parameters from CAM document

Unread post by Rubenpmo »

I looks like we have to us IElements interface from TopSolid Kernel, not TopSolid.Cam...

Code: Select all

TopSolidHost.Elements.GetProperties(part)
where part is an ElementId.

BR
Rúben
Post Reply