How To Use Custom Properties In The Solidworks Api Part 9

How To Use Custom Properties In The Solidworks Api Part 9 Add, edit and delete custom properties ( summary info) with the solidworks api. getting started can be tough, so we explain the basics here. This section contains macros and code examples for utilizing the custom properties in solidworks api. custom properties is a collection of key value pairs used in solidworks to store the metadata.

How To Use Custom Properties In The Solidworks Api Part 9 Detailed overview of automating custom properties using solidworks api. reading and writing custom properties to file, configuration and cut list items. handling the custom properties modification using events. accessing the custom properties from document manager api, introduction to invisible custom properties. This example shows how to get the custom properties for the configurations in a document. set swmodel = swapp. activedoc. debug.print "file = " swmodel. getpathname. vconfname = swmodel. getconfigurationnames. set swconfig = swmodel. getconfigurationbyname (vconfname (i)) nnumprop = swconfig. getcustomproperties (vpropname, vpropvalue, vproptype). Hi, i have published a new detailed blog article with several macro code examples to cover all the aspects of working with custom properties from the api: solidworks custom properties automation examples on how to read and write general, configuration specific and cut list custom properties. This example shows how to get the names, types, values, and evaluated values of the active configuration's custom properties. it also shows how to add a custom property to the configuration.

How To Use Custom Properties In The Solidworks Api Part 9 Hi, i have published a new detailed blog article with several macro code examples to cover all the aspects of working with custom properties from the api: solidworks custom properties automation examples on how to read and write general, configuration specific and cut list custom properties. This example shows how to get the names, types, values, and evaluated values of the active configuration's custom properties. it also shows how to add a custom property to the configuration. This vba macro example demonstrates how to add (create new or change existing) custom properties to various custom properties sources using solidworks api. this includes file (general) custom properties, configuration specific custom properties and cut list items (weldment or sheet metal) custom properties. My first task is pretty easy, i just want to write a macro that will allows me to add some predefined custom properties to every part in an assembly. first step is to just add the custom properties to one, already open sw part. Custom properties let you store metadata from your model, like the mass or the total surface area. you can also create them for configurations and bodies. I am trying to modify an api that adds custom property data to parts. i use : for m = 0 to 3 retval = part.addcustominfo3 ("", myprop (0, m), 30, myprop (1, m)) next m which works if the custom property did not previously exist. what do i have to do overwrite an existing value?.
Comments are closed.