Get Part Parameters from CAM document

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

Moderators: remi77, Daniel, jacs

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

Get Part Parameters from CAM document

Post by Rubenpmo » Tue Aug 23, 2016 11:22 am

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

Post by Rubenpmo » Wed Aug 24, 2016 11:10 am

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

Who is online

Users browsing this forum: No registered users and 1 guest