Register  Login   Search
 Latest Posts Minimize

How to ask values in mm?
Solid Edge Programming
03/11/2010 12:26 AM
jurajjoob

RE: Through the program to create a square tube???
Solid Edge Programming
03/10/2010 2:58 AM
fatkids

RE: .Net: print of dwg files as pdf scaling problem
Solid Edge Programming
03/09/2010 3:55 AM
wksyspro

SEpartX crashs VB6
Solid Edge Programming
03/08/2010 8:38 AM
ara

Assembly instances not supported
Solid Edge General
03/07/2010 8:10 PM
cadourian

RE: .Net: print of dwg files as pdf scaling problem
Solid Edge Programming
03/06/2010 2:44 PM
tirolerover40

RE: .Net: print of dwg files as pdf scaling problem
Solid Edge Programming
03/06/2010 4:06 AM
wksyspro

RE: .Net: print of dwg files as pdf scaling problem
Solid Edge Programming
03/05/2010 2:35 PM
tirolerover40

RE: .Net: print of dwg files as pdf scaling problem
Solid Edge Programming
03/05/2010 11:36 AM
wksyspro

How to add menu to the QuickAccessToolbar
Solid Edge Programming
03/05/2010 4:57 AM
TomasV

Save sketched profile
Solid Edge Programming
03/04/2010 9:42 AM
Autoit

Use Isotable.dll with ST2 64bits
Solid Edge Programming
03/04/2010 7:22 AM
sinex

.Net: print of dwg files as pdf scaling problem
Solid Edge Programming
03/03/2010 3:03 PM
tirolerover40

How to get the threadFeature information from CopiedPart?
Solid Edge Programming
03/01/2010 5:36 AM
Julia

RE: How to read, from a draft, the file properties of the part / assembly
Solid Edge Programming
02/26/2010 8:18 AM
mdrummond

Assy Oeration Property
Solid Edge Programming
02/26/2010 8:13 AM
mdrummond

How the expansion of the Engineering Reference?
Solid Edge Programming
02/25/2010 8:35 PM
fatkids

RE: problems with creating toolbar
Solid Edge Programming
02/25/2010 11:39 AM
Nika_Neugier

Crash editing blocklabeloccurrence value
Solid Edge Programming
02/25/2010 2:55 AM
Tymen

problems with creating toolbar
Solid Edge Programming
02/24/2010 5:43 AM
Nika_Neugier

RE: Convert .dft to .dxf
Solid Edge Programming
02/23/2010 1:11 PM
jvelasco

RE: Internal Error: Invalid Status 0x248
Solid Edge General
02/22/2010 8:46 AM
catamayo

how to get mouse click event of the view of the SEPreview.ocx
Solid Edge Programming
02/21/2010 7:29 PM
wei

how to use the SEPreview.ocx
Solid Edge Programming
02/20/2010 2:41 AM
wei

Solid Edge / Insight BOM Extraction
Solid Edge Programming
02/18/2010 9:14 AM
alspaughja

How to set FaceStyle for face in occurrence?
Solid Edge Programming
02/18/2010 1:08 AM
jurajjoob

How to set Occurrence.FaceStyle to (Use Part Style) or (None)?
Solid Edge Programming
02/17/2010 2:42 PM
jurajjoob

RE: Exception when calling....
Solid Edge Programming
02/17/2010 8:03 AM
boman

Edit occurrence in place
Solid Edge Programming
02/17/2010 5:35 AM
Tymen

Getting part surface from assembly surface
Solid Edge Programming
02/16/2010 3:18 AM
Serge


  
 Forums Minimize

Subject: Add method of SolidEdgePartSync::ProfileSets throws an exception
Prev Next
You are not authorized to post a reply.

Author Messages
VadimUser is Offline
New Member
New Member
Posts:4

12/08/2009 7:05 AM  

Hello All,

I've started moving our application to Solid Edge ST2 and encounter with the following problem:

One of the things we need to do is to project an arc on a 2d profile. We have a code taken from the programming guide, which worked in Solid Edge ST (100) and the previous versions. However, in the ST2 the code throws the "Unspecified error" exception.

The code is in VC++ 2008:

SolidEdgePartSync::PartDocumentPtr spDocument;

... Initialization...

SolidEdgePartSync::ProfileSetsPtr spProfileSets = spDocument->GetProfileSets();
SolidEdgePartSync::ProfileSetPtr spProfileSet = spProfileSets->Add();

The Add method throws the exception.

 

Any help will be greately welcome.

Thanks,

Vadim

R.D. HollandUser is Offline
Solid Edge Developer
Site Member
Site Member
Posts:36

01/26/2010 10:54 AM  
Get the Sketchs collection from the sync part doc and call the Add method. Here is some sample code where I create a specific sketch (with a given orientation).

SolidEdgePartSync::ProfilePtr CreateProfileForSketch( SolidEdgePartSync::PartDocumentPtr pPartSyncDoc, double OriginΑ], double NormalΑ], double XaxisΑ], SolidEdgePartSync::SketchPtr& pPartSyncSketch )
{
SolidEdgePartSync::ProfilePtr pPartSyncProfile;
if( NULL == pPartSyncSketch )
{
SolidEdgePartSync::SketchsPtr pPartSyncSketches;

if( NULL != pPartSyncDoc )
{
pPartSyncSketches = pPartSyncDoc->Sketches;
}

if( NULL != pPartSyncSketches )
{
pPartSyncSketch = pPartSyncSketches->AddByPlaneGeometry( OriginΎ], OriginΏ], Originΐ], NormalΎ], NormalΏ], Normalΐ], XaxisΎ], XaxisΏ], Xaxisΐ]);
}
}

if( NULL != pPartSyncSketch )
{
pPartSyncSketch->PutEnableRegions ( VARIANT_TRUE );
// orignially called PutMergeWithCoplanarSketches here. But that is not
// good logic as the system is creating "permanent" sketches when AddByPlaneGeometry is called so I
// get a different sketch when using the same plane in the AddByPlaneGeometry call. Then when
// PutMergeWithCoplanarSketches is called, the sketches merge. So the logic error is that the sketch
// is empty at this point. I need to set the flag after Profile->End is called. But I decided
// to just always create multiple sketches.

//pPartSyncSketch->PutMergeWithCoplanarSketches ( VARIANT_TRUE );
pPartSyncSketch->PutMigrateGeometryAndDimensions ( VARIANT_TRUE );

pPartSyncProfile = pPartSyncSketch->Profile;
}

return pPartSyncProfile;
}
VadimUser is Offline
New Member
New Member
Posts:4

02/01/2010 8:02 AM  
R.D. Holland,
Thank you very much for your response.

I tried to implement your suggestion but encountered some problem:

My scenario is to get information about arcs/circle geometry by projecting them on 2d. All the examples in the Programmer's Guide show, that I need to add a profile set, then get a profile. Prior to ST2 I used the Profile::ProjectEdge method and then converted the result to Arc2d or Circle2d. When I have implemented the Sketch-Profile solution, I was unable to get Arc2d or Circle2d objects neither from the ProjectEdge method result nor from the Arcs2d / Circles2d Profile properties.

Any ideas?

Vadim
You are not authorized to post a reply.
Forums > Solid Edge > Programming > Add method of SolidEdgePartSync::ProfileSets throws an exception



ActiveForums 3.7

  

 Users Online Minimize

Membership Membership:
Latest New User Latest: simoned
New Today New Today: 0
New Yesterday New Yesterday: 0
User Count Overall: 1767

People Online People Online:
Visitors Visitors: 2
Members Members: 0
Total Total: 2

Online Now Online Now:

  

Siemens PLM Connection

JasonNewell.NET on Facebook

The Code Project

Spatial Freedom Astroid

Use OpenDNS

Copyright 2008 JasonNewell.NET   Terms Of Use  Privacy Statement