Splitting Drawings in Layout
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-21
02:50 PM
- last edited on
2021-09-14
09:32 AM
by
Noemi Balogh
2021-06-21
02:50 PM
Hi,
I am trying to Split a drawing into two drawings.
The situation is:
While placing a drawing in layout we need to split the drawing into two drawings(just make the drawing into half) and will put in on the layout.
I have tried it with "APIDb_StartClippingSessionID" function:
Any suggestion how can I achieve it?
I am trying to Split a drawing into two drawings.
The situation is:
While placing a drawing in layout we need to split the drawing into two drawings(just make the drawing into half) and will put in on the layout.
I have tried it with "APIDb_StartClippingSessionID" function:
API_Region clipRegion; BNZeroMemory(&clipRegion, sizeof(API_Region)); clipRegion.box.xMin = 0.0; clipRegion.box.xMax = .2; clipRegion.box.yMin = 0.0; clipRegion.box.yMax = .1; err = ACAPI_Database(APIDb_StartClippingSessionID, nullptr, nullptr); if (err == NoError) { API_Element element; BNZeroMemory(&element, sizeof(API_Element)); element.header.typeID = API_DrawingID; err = ACAPI_Element_GetDefaults(&element, nullptr); if (err != NoError) { return err; } //here the Selectedguid array holds the ViewNavigator Item guid element.drawing.drawingGuid = Selectedguid[0]; element.drawing.anchorPoint = APIAnc_LB; element.drawing.pos.x = 0.05; element.drawing.pos.y = 0.05; err = ACAPI_CallUndoableCommand("crate new from last drawing", [&]()->GSErrCode { err = ACAPI_Element_Create(&element, nullptr); err = ACAPI_Database(APIDb_DoClipID, &clipRegion, nullptr); err = ACAPI_Database(APIDb_StopClippingSessionID, nullptr, nullptr); return err; });But it's not working. On "ACAPI_Database(APIDb_DoClipID, &clipRegion, nullptr)" method getting error code "-2130313215" that refers to the "General error code".
Any suggestion how can I achieve it?
Labels:
- Labels:
-
Add-On (C++)
0 REPLIES 0