How to Create/Place Custom Support with measurement USING API/SDK

How to Create/Place Custom Support with measurement USING API/SDK

joseph.sarmiento.m5
Contributor Contributor
651 Views
5 Replies
Message 1 of 6

How to Create/Place Custom Support with measurement USING API/SDK

joseph.sarmiento.m5
Contributor
Contributor

I need to add that measurements.

See the image for reference.

josephsarmientom5_0-1713233231849.png

I want to replicate the behavior of creating custom support through the spec editor in API/SDK.

Using the API/SDK sample doesn't include measurements before placing it to the pipe.

 

0 Likes
652 Views
5 Replies
Replies (5)
Message 2 of 6

h_eger
Mentor
Mentor

@joseph.sarmiento.m5 ,

 

This has nothing to do with the SDK/API but with the activation of dynamic input (F12).
When dynamic input is active, the dimension chains are displayed when P3D objects are inserted.

16-04-2024_07-31-43.jpg

 

-

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).

Hartmut Eger
Senior Engineer
Anlagenplanung + Elektotechnik
XING | LinkedIn

EESignature



0 Likes
Message 3 of 6

joseph.sarmiento.m5
Contributor
Contributor

My dynamic input is enabled.

I was talking about when placing the custom object through this example from the API SDK, the measurement is missing.

josephsarmientom5_0-1713246820222.png

 

josephsarmientom5_1-1713246839215.png

 

 

0 Likes
Message 4 of 6

h_eger
Mentor
Mentor

where did you define your connection point for support?

AcPp3dPort port;
  port.setIsSymbolic(true);
  port.setPosition(isSymbol->position());
  port.setDirection(AcGeVector3d(0,0,1)); // set direction correctly
  port.setName(L"Symbolic");
  isSymbol->addPort(port);                
  AcDbObjectId isSymbolBlockId;

  int appendConnectorEntryError = pBlock->appendAcDbEntity(isSymbolBlockId, isSymbol);

  // TODO:
  // open the fitting you want to connect to kForWrite; AcPpDb3dPart derived
  //  open fitting denoted by pPart below
  //

  AcPp3dPort port1;
  port1.setIsSymbolic(true);
  AcString symbolicPortName = pPart->generateDynamicPortName(true);
  port1.setName(symbolicPortName.kACharPtr());
  port1.setPosition(pSymbol->position());

  // set direction correctly

  port1.setDirection(AcGeVector3d(0,0,-1));

  // this is the fitting the iso symbol is going to be connected to

  pPart->addPort(port1);     
-

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).

Hartmut Eger
Senior Engineer
Anlagenplanung + Elektotechnik
XING | LinkedIn

EESignature



0 Likes
Message 5 of 6

joseph.sarmiento.m5
Contributor
Contributor

I didn't define a connection point for support,

I'm just using the example.

How do I implement it in the current example of SDK API?

0 Likes
Message 6 of 6

dave.wolfe
Advisor
Advisor

It sounds like you are wanting the user interaction that happens when placing the support. Is that correct? If so, that is an AutoCAD jig (probably an entity jig), and you would have to implement that via the AutoCAD api.

Dave Wolfe
Isaiah 57:15

EESignature

Plant 3D Wish list

Piping Labs