Basic intrinsic functions and object properties of C++creo

Source: Internet
Author: User
Tags null null

Object:

PROMDL (model handle): The model is the top-level object in Creo. For example, in part mode, the model is part of; In assembly mode, the model is an assembly.
The properties of the model are proparameter;
Sub-object of the model: Prosolid;
The model is also the attribute of Promodelitem;

Prosolid (base class for a part or assembly): An abstract Creo parametric object that represents all common characteristics of parts and assemblies, such as features, dimensions, and parameters.
Prosolid Class (Base class | | Parent class) is promdl;
The sub-objects of the entity have propart,proassembly;

Promodelitem (model Item): The Model project is all the items in the model. Each model item is a database object that has a unique identifier and type.
The properties of the Model project are: PROMDL (model), proparameter (parameter);
The model project is also the attribute of proselection;


Proselection (selection): The Selection object is typically generated as a result of selecting any Creo parametric object. The Selection object contains not only the information of the selected object,
It also contains other useful information, such as the location of the Creo parametric object in the assembly hierarchy, the coordinates selected, and so on. Select the item that represents the actual user selection,
However, it is also used to represent the geometry reference of features and annotations.
The properties of the selected object include: Proasmcomppath,promodelitem, etc.;

Proparameter (parameter): A parameter that can belong to a model, feature, annotation element, geometry item, external object, material, or other Creo parameter model item.
Parameters are properties of Promodelitem and PROMDL.

Promatrix (transformation matrix): The transformation matrix is used to obtain the position of the entity coordinate point relative to its position in the drawing coordinate system. The matrix is composed of the orientation of the three coordinate datum axis and the location of the origin point.

Proasmcomp (assembly-built functionality): A component is the building block of a component. They are parameter characteristics. In an application mix, a component can have a specific type. For example, in a manufacturing assembly, there are workpiece parts, design part parts, and so on.
Proasmcomp Class (Base class | | Parent class) is Profeature
The properties of the component are Proasmcompconstraint
Component is a property of proassembly

Proasmcompconstraint (assembly constraint structure): Creo parametric toolkit The details used to build constraints on component components. You can parameterize a component by establishing a constraint that qualifies the position of the component in the component.
The position of the component changes depending on the component or assembly feature that it restricts.

Proasmcomppath (Assembly Path): In any level of composition (components including subcomponents, etc.), the assembly component path enables you to reference a specific component in the component.
Proasmcomppath is a property of proselection.


Function:
#include <ProMdl.h>

Promdlcurrentget: Gets the P_handle (handle) initialized with the current Creo model object
The parameter is promdl (out) and the current object model to be obtained is output to the newly created model object.
Return value: Pro_tk_no_error successfully initialized handle; Pro_tk_bad_context to set Creo object

ProSelect: Select an object in the Creo window. (Note: If the user ends the selection without any action,
ProSelect will return pro_tk_no_error with (* p_n_sels) zero and p_sel_array to null.)
Parameters: 1,char option[] (select filter, search by index to select the part: "User interface:selection" such as: Part,point,csys)
2.int max_count ( The maximum number of selected selections allowed.
3.proselection* P_in_sel (the Proarray of the pointer used to initialize the proselection structure of the selection array (from the last call to the selection). This can be null.
4.proselfunctions* Sel_func (pointer to the filter feature structure.) This can be null. )
5.ProSelectionEnv sel_env (using Proselectionenvalloc () to assign this parameter. can be null.
6.ProSelAppAction appl_act_data (Null in version 18 and later).
7.proselection** P_sel_array (pointer to an array of proselection structures.) This parameter points to the static memory allocated by the function. It is reassigned in subsequent calls to this feature. proselection* array Select coordinate system in assembly, out output parameter
8.int* p_n_sels (actual selected quantity, out output parameter)
return value: Pro_tk_no_error (User made a selection or selected finish)
Pro_tk_user_abort (the user chooses to exit.)
Pro_tk_pick_above (the user selects from any of the buttons on the menu above to break the selection.) The
Pro_tk_e_deadlock (Creo user interface is not ready to process this request because it is blocked by another process, such as an OLE container activation). )

Promdlretrieve: Retrieves the specified model and initializes the handle. The function retrieves the model into memory, but does not display the model and does not use it as the current model.
If the component is retrieved and an error occurs during regeneration, the component will include suppressed functionality. The Prosolidretrievalerrorsget function identifies whether an error occurred.
Parameters: 1. Profamilyname name (to retrieve the name of the model)
2.ProMdlType type (types of models to retrieve)
3.promdl* P_handle (retrieves the handle to the model)
return value: Pro_tk_no_error (this feature successfully retrieved the model)
Pro_tk_bad_inputs (Invalid one or more input parameters)
Pro_tk_e_not_found (the model could not be found in the current directory.) )
Pro_tk_no_permission (this feature is not authorized to operate on this model.) )

#include <ProAsmcomppath.h>

Proasmcomppathmdlget: Retrieving the model specified by the component path
Parameters: 1. proasmcomppath* P_path (component path)
2.promdl* P_model (model found at the end of the component path, out)
return value: Pro_tk_no_error (the feature successfully retrieved the model.) )
Pro_tk_bad_inputs (The input parameter is invalid.) )
Pro_tk_general_error (The specified component path is wrong, or contains missing members.) )

#include <ProAsmcomp.h>

Proasmcompassemble: Adds a component to a component or subcomponent at the specified initial location.
Parameters: 1. proassembly owner_assembly (Components/subcomponents, adding components.) Null is a valid parameter. This assembly is used in this case)
2.ProSolid Component_model (assembly module model)
3.ProMatrix Init_pos (Assembly initial position)
4.proasmcomp* feature (processing the newly created assembly component, out output)
return value: Pro_tk_no_error (the function successfully created a assembly = component)
Pro_tk_bad_inputs (Invalid input)

#include <ProArray.h>

Proarrayalloc: Allocates an array of objects. The maximum allocated memory is approximately 2Mb, except for Alpha_unix (or other 64-bit platforms), and its maximum value is twice times.
For data on obtaining the maximum number of objects that can be stored in obj_size in a specified Proarray, see Proarraymaxcountget.
Parameters: 1.int N_OBJS (the initial number of objects allocated in the array.) )
2.int Obj_size (the size of each object in the array)
3.int reallocation_size (if Creo parametric toolkit adjusts the array size, the minimum number of objects added or removed, for example, is called Proarrayobjectadd. )
4.proarray* P_array (allocated array, out output)
return value: Pro_tk_no_error (the function successfully assigned an array)
Pro_tk_bad_inputs (one or more input parameters are not valid.) )
Pro_tk_out_of_memory (array too large to allocate)

#include <ProModelitem.h>

Promodelitembynameinit: Given a model item handle, the name and type of the given project (P_item is pre-allocated).
Parameters: 1. PROMDL MDL (model handle)
2.ProType type (the type of item to find.) )
The name of the 3.ProName name (the item to find.) )
4.promodelitem* P_item (points to the found item. Out
return value: Pro_tk_no_error (the item was found.) )
Pro_tk_e_not_found (the item was not found.) )
Pro_tk_bad_inputs (Invalid one or more input parameters)

Proselectionalloc: Allocates and optionally fills the Selection object.
The allowable combinations of input parameters are as follows: P_cmp_path P_MDL_ITM
! Null! Null
Null! Null
NULL NULL
Parameters: 1. proasmcomppath* P_cmp_path (component path (can be null))
2.promodelitem* P_MDL_ITM (model item (can be null))
3.proselection* P_selection (Assigned Selection object, out output)
return value: Pro_tk_no_error (function successfully assigned selection)
Pro_tk_bad_inputs (allocation failed.) )

Proasmcompconstraintalloc: Allocating memory for assembly component constraint structures
Parameters: proasmcompconstraint* p_constraint (ASMCOMP constrained structure, out output)
return value: Pro_tk_no_error (This function successfully allocates memory for the structure.) )
Pro_tk_out_of_memory (Insufficient memory.) )
Pro_tk_bad_inputs (Invalid input.) )

Proasmcompconstrainttypeset: Sets the constraint type for the specified constraint.
Parameters: 1. Proasmcompconstraint constraint (component part constraints)
2.ProAsmcompConstrType type (constraint type. )
return value: Pro_tk_no_error (Feature success setting information.) )
Pro_tk_bad_inputs (Invalid argument.) )

Proasmcompconstraintasmreferenceset: Sets the constraint reference and direction to the specified constraint
Parameters: 1. Proasmcompconstraint constraint (component part constraints)
2.ProSelection asm_ref (assembly reference. )
3.ProDatumside asm_orient (Assembly direction)
return value: Pro_tk_no_error (Feature success setting information.) )
Pro_tk_bad_inputs (Invalid argument.) )

Proasmcompconstraintcompreferenceset: Sets the constraint reference and direction to the specified constraint.
Parameters: 1. Proasmcompconstraint constraint (component part constraints)
2.ProSelection Comp_ref (Component Reference. )
3.ProDatumside comp_orient (Component orientation)
return value: Pro_tk_no_error (Feature success setting information.) )
Pro_tk_bad_inputs (Invalid argument.) )

Proarrayobjectadd: Adds an object to the specified position in the array, or appends an object to the end of the array.
For example, if you want to insert an integer in an integer array, call the function as follows:
Proarrayobjectadd (&int_array,0,1, (void *) &int_val);
If you want to insert 3 doubles in the second position in a binary array, call the following function:
Proarrayobjectadd (&dbl_array,2,3, (void *) Dbl3_arr);
Note: Because this call may cause the array to be redistributed, the address of the array must be passed.
Parameters: 1. Proarray* P_array (the address of the array.
2.int Index (the position in the array where the object is inserted.) If you specify a value that is less than 0 (pro_value_unused), the function attaches the object to the end of the array.
3.int n_objects (number of objects to add to the array)
4.void* p_object (Continuous object datasets will be copied from the address to the array)
return value: Pro_tk_no_error (the function successfully added the object to the array.)
Pro_tk_bad_inputs (one or more parameters are not valid.)
Pro_tk_out_of_memory (the array is too large to be allocated.) )

Proasmcompconstraintsset: Sets a series of constraints for a given component component. This feature modifies component feature data and rebuilds component components.
Parameters: 1. proasmcomppath* Component_path (the path to the owner assembly is restricted to references to other members of the top-level assembly.) Should be null if the constraint is only relative to the assembly owner in the assembly. )
2.proasmcomp* Component (Assembly components)
3.proasmcompconstraint* p_constraints (constraint of Proarray array)
return value: Pro_tk_no_error (Feature success setting information.) )
Pro_tk_bad_inputs (Invalid input.) )
Pro_tk_invalid_type (component parameter is not a valid assembly component)
Pro_tk_invalid_ptr (p_constraints array is not a valid Proarray. )
Pro_tk_general_error (regeneration failure with the specified constraint; The component reverts to the previous configuration. )

Prosolidregenerate: Regenerate the specified prosolid
Parameters: 1. Prosolid P_handle (Prosolid regenerated. )
2.int flags (bit contains one or more bit flags Pro_regen_ *)
return value: Pro_tk_no_error (this feature succeeded in regenerating Prosolid. )
Pro_tk_unattached_feats (non-attached feature detected, but no regeneration failed)
Pro_tk_regen_again (the model is too complex to regenerate again)
Pro_tk_general_error (Regeneration failed)
Pro_tk_bad_inputs (incompatible flag.) )
Pro_tk_bad_context (if mixed with Pro_regen_force_regen, the combination of the REGEN flag and/or regeneration flag is not valid.) )

Basic intrinsic functions and object properties of C++creo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.