Inventor API Scale feature

Inventor API Scale feature

p_krola
Enthusiast Enthusiast
475 Views
4 Replies
Message 1 of 5

Inventor API Scale feature

p_krola
Enthusiast
Enthusiast

I would like to use "DirectEditScaleOperation". while "DirectEdit Features" has no methods.

pkrolSPVRG_0-1669458591547.png

pkrolSPVRG_1-1669458787281.png

What's the problem?

 

0 Likes
476 Views
4 Replies
Replies (4)
Message 2 of 5

JelteDeJong
Mentor
Mentor

The "DirectEditFeatures" is a list of DirectEditFeature objects. If you want to manipulate an object then you first need to get the correct one from the list.

Dim doc As PartDocument = ThisDoc.Document
Dim def As PartComponentDefinition = doc.ComponentDefinition

' Get the object of the first "DirectEditFeature"
Dim feature As DirectEditFeature = def.Features.DirectEditFeatures.Item(1)

Dim firstOperation As DirectEditOperation = feature.DirectEditOperations.Item(1)
Dim operationTypeName = CType(firstOperation.DirectEditOperationType, DirectEditOperationTypeEnum).ToString()

MsgBox(operationTypeName)

Dim directEditScaleOperation As DirectEditScaleOperation = firstOperation
MsgBox(directEditScaleOperation.Name)

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 3 of 5

p_krola
Enthusiast
Enthusiast

pkrolSPVRG_0-1669474209390.png

 

0 Likes
Message 4 of 5

p_krola
Enthusiast
Enthusiast

I have no idea how to solve this problem. Can anyone tell me what the syntax should look like in c#?

0 Likes
Message 5 of 5

BrianEkins
Mentor
Mentor

Unfortunately, the Direct Edit feature is not fully supported by the API. It has minimal support, which means you can access existing features of that type and they support general feature operations, like reorder, delete, rename, etc. However, you can't create new features of that type and you can't query or edit the information that is specific to that feature type.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes