• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

macro properties

seecisud

Guest
Greetings to all.

I am trying to domesticate solidworks 2013 so that I can use it for business needs
and currently I need to solve the problem below.
  1. I have set the custom properties in files/properties and realize its custom templates;
  2. I have implemented property entry screens through the property tab builder to make it easy to build custom properties;
  3. I have designed parts and assemblies inherent objects that I must send into production, compiling their properties through the corresponding bread task and inserting its toolboxes.
  4. I have realized the design of the parts and assemblies (the table sets to understand us)
  5. I have provided the separate materials.
at this point I found that in distinct materials the part numbers I assigned to my parts and assemblies were not present in the num.parte column that instead concerned the part numbers of the tollboxes.
as it is unlikely to suggest to change all the sw tolboxes to make sure that the correct values appear in num.parte I have redesigned all my works to assign the part number to the configuration name of the part itself.
In this way I adapted my way of working the way toolboxes were prepared.
proceeding in this way, when I insert the distinct material into a drawing of a set, for example, in the column num.parte appear the correct part numbers and do not remain empty cells.

I have noticed that if I unload a 3d cad of a supplier through the property bread task and the custom property file I have compiled I can insert, even in the portion file so downloaded, the custom properties valid for all the other files I have prepared from the beginning of the job and this guarantees that when I pass to the table, the folder will also work for the files of part downloaded.

problem:
the problem remains with the distinct material.
in fact, always with reference to a downloaded 3d file, I should correctly insert the number of part (which I build through the concatenation of different custom properties type: commission number, operation number, group number, part number etc.... )
manually in the configuration manager so that said part number becomes the name of the configuration of the part on which I am working.
I managed to write a macro that provides the number of part in the configuration name but I can't do the same to change the configuration description (which in the toolbox contains other information that will appear in the separate material)

the maco with which I can do as above is the following:

dim swapp as object

dim part object
dim boolstatus as boolean
dim longstatus as long, longwarnings as long

sub main()

set swapp = _
application.sldworks

set part = swapp.activedoc
boolstatus = part.extension.selectbyid2("default", "configurations", 0, 0, 0, false, 0, nothing, 0)
boolstatus = part.editconfiguration3("default", "$prp:""cncommessa"".$prp:"cnop"".$prp:"cngroup".
end


I tried to reach the variable that contains the value of the "description" field of the configuration manager in all ways but I can not find a solution.
all the macros I tried to write don't work or do what I need.

requestIs there someone of good will that helps me find a system to insert a value in the "description" field of the configuration manager through a macro or through something alternative that does not force me to manually insert each time the values that I have to go to get between the custom properties? (Remember: the number of parts is built through the concatenation of multiple custom properties! )

I hope I've been clear and if I haven't been able to apologize.
rest available for further clarification and collaborations.

thanking from now on who will give me a pinch of his time and send my greetings .
 
Hello, could you post a part with the correct properties and one with incomplete propheirties?
In this way we understand the "first" and the "after" and analyze the roads better to get there.
Good day
jenaury
 
Hi, jenuary.
I gladly attach what is required and apologize for not doing it before.

I also add two image files with which I try to make understand what is the area of interest and how it has to change.

for now a great and heard thanks for the availability and attention shown.
 

Attachments

  • Parte corretta.webp
    Parte corretta.webp
    83.5 KB · Views: 41
  • Parte incompleta.webp
    Parte incompleta.webp
    80.5 KB · Views: 26
  • Parti.zip
    Parti.zip
    235.8 KB · Views: 11
I think this method is not good because if you change a value of a property changes the name of the configuration. at this point what happens in the assemblies where the newly eliminated configuration was used? If the part had only that no problem, but if it contained others I would say that the problems are...
I don't know toolbox, but I know that many build custom properties, are you sure you don't agree to work that way?
 
first of all thank you for the answer.

the custom properties I have configured them myself and I do them every time through the appropriate bread task but this applies to the parts I design from the beginning and not to the toolboxes.

changing the properties of many toolboxes to align them to my needs is certainly not practical nor, at least, it is best to assign for example a number of parts to the toolbox that I am using at that particular moment because at the next use I should rename it getting, so, the change also in the assemblies where I used the same component previously with different part number.

for this reason I thought of adapting the properties of my files to those of toolboxes....
On the other hand, if I do not adjust, if I insert some toolboxes into a set and then in the table put in the separate material, in the column num.parte, for the rows relative to the toolbox, will appear the properties set in the chosen toolboxes that will not correspond to the ones I set in my files aside, therefore I have to choose to make my properties or those of the toolboxes appear.
I would like to avoid this and therefore, since in the column part of a separate material appears the name of the toolbox configuration, I preferred to associate with the name of the configuration of my side file (or together) the number of part I decide through the compilation of multiple custom properties chained. ...

As for the presence of multiple configurations, it is, for example, to relaunch the same macro for each active configuration and to which will correspond a number of different parts.... and all this before you realize the various assemblies.

This system works, because already tested, in all cases where, starting from scratch, I personally realize each part but I begin to have difficulty when discharge of the 3d components.
In this case, in fact, I must remember every time I go to change the name and description of the configuration with strings that remember by memory is certainly not the easiest thing to do.... this is why I look for something that automates this process as it happens for example by reaalizing the custom property bread task with the property tab builder but in which it is not possible to implement the modification of the name and description active configuration. .

Salujah
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top