Change parameter value at assembly doc in API
Change parameter value at assembly doc in API
(OP)
Hi!
I'm programmer, and not CAD designer.
I have a big problem:
The parameter handling by the part document was success and it working...
But now, if I have (only) a parameter name (for example: S@Vázlat1) and I known the assembly document name (for example: LABE00.SLDASM), and I dont known the part document name and location.
How that to catch and modify the parameter value?
I working Visual C++ 6.0 .
Thanks!
ZsZs.
I'm programmer, and not CAD designer.
I have a big problem:
The parameter handling by the part document was success and it working...
But now, if I have (only) a parameter name (for example: S@Vázlat1) and I known the assembly document name (for example: LABE00.SLDASM), and I dont known the part document name and location.
How that to catch and modify the parameter value?
I working Visual C++ 6.0 .
Thanks!
ZsZs.






RE: Change parameter value at assembly doc in API
RE: Change parameter value at assembly doc in API
This could mean traversing the entire assembly until you find a part with a matching parameter. If your parameter has a common name (like "D1@Extrude1"), there is a good chance your program will find the wrong part.
http://www.EsoxRepublic.com-SolidWorks API VB programming help
RE: Change parameter value at assembly doc in API
In the Solidworks my college design a CAD 2D/3D draw.
And I write a interface, that cache (connect with COM) the Solidworks program, and it my Visual C++ programs modify the CAD plan parameter variables, that it reflect the actual size.
We problem, that have many part in by the furniture structure dependent directury structure (not fix). And we have only 2-4 parameter, taht must be to change.
I program don't know from CAD-plan (draw) sturucture. I don't know the directory wherein the part document.
I know only the parameters name that must be modified, and the assembly file name.
I remember have the general method to acessing the parameters by name (similar IModelDoc2->SelectByID() method).
Have a chance to find a part doc name (and location) from the parameters name?
I have parameter S@Vázlat1 in the Solidworks. From this parameter name may be to know (or find) the associate part document location?
If it true then I able to open and modify the parameters in the part document.
Thanks!
ZsZs.
RE: Change parameter value at assembly doc in API
RE: Change parameter value at assembly doc in API
The parameter name derived form we convention, X@ = width, Y@ = heigh, Z@ = depth, if it understand.
The @Vázlat is contant all parameters.
The parameters 'X@Vázlat', 'Y@Vázlat', and 'Z@Vázlat'.
But the part document location unknown. It may be "anywhere".
The parameter name is unique. We attend for it.
Whereby examine the parameters in list?
This list connect the assembly file?
Or Open the all part document in full directory dept (origin from sldasm file location - it may be correct chance...) and search the parameters for all?
Can you thell me the method (function) name? (or any example code - any language...)
Thank!
ZsZs.