Variable in MEP cartridge

Hello @Tous

I've been using a basemap for ages and I'd like to add the description behind the file name (see attachment).

But I would like it to be the description of the part file and not that of the plan that I don't fill in unless it was automatic.

I guess in the title box you have to add something like $PRPSHEET:"Description" or $PRP ?????

Also how to see (visualize) all variables of type $PRP ????? already contained in the cartridge.

In short, how to add the right thing to the MEP cartridge. Like adding the material automatically, etc...

Any other advice on cartridges will be welcome ;-)

Kind regards

PS: I lent my SW Training Book to a young person who didn't give it back to me, so I'm like a truck in a breakdown ;-)
ZZ

 


2020-06-21_17_22_34-afficher_la_description_-_u_748-19_v1b.sldprt.jpg

Hello

I put the solidworks parameters in the plane part model and asm:

 

Note in plan: $PRPSHEET:{EPAISSEUR_TOLERIE}  

part-ASm parameterization: EPAISSEUR_TOLERIE  ->  "Epaisseur@Tôlerie"

 

Note in plan: $PRPSHEET:{Material}

part-ASM parameterization: Material -> "SW-Material@@Défaut@Pièce2.SLDPRT"

 

Note in plan: $PRPSHEET:{Mass}  

Part-ASM parameterization:Mass ->  "SW-Mass@ci tweeks. SLDPRT"

This macro to retrieve the filename, to be adapted as needed

Ace Object
As ModelDoc2
As SldWorks.Configuration
As CustomPropertyManager
As Long
As String
As String
As String

Sub main()   
Set swApp = Application.SldWorks   
Set swModel = swApp.ActiveDoc'We get the file 
name myValue1 = Left(myValue0, 8) 'first 8 characters of the file name


Set config = swModel.GetActiveConfiguration 
Set cusPropMgr = config. CustomPropertyManager 
lRetVal = cusPropMgr.Add3("filname", swCustomInfoType_e.swCustomInfoText, myValue1, swCustomPropertyAddOption_e.swCustomPropertyDeleteAndAdd) 

End Sub
4 Likes

Thank you @Yannick

I'm looking at all this and I'm coming back to give you the result.

Kind regards

1 Like

The attachment I had forgotten may help.

I'm in SW2017


det00000.zip
1 Like

Hello @Tous and @yannick

I don't understand where to put the solidworks settings in the part model, plan and asm.

I think you have to create all these parameters before in the different models (part, Asm Drw) but  WHERE  and How?
That is the question! I watched a video but the person had probably created everything before so I'm not further ahead. (despite the indications of @Yannick ;-) )

I must be a little dumb because I can't find how to do it in the online help.

Brief! I need you.

Kind regards

 

You need to put the metadata information in the properties of the model file .

File -> property

Example Property to add to your template

Save the model in .prtdot  for part, assembly, and MEP

Yannick

 

1 Like

For annotations in MEP right-click on the note -> Edit in a new window

Add $PRPSHEET:"filename" for example

I don't think I forgot anything.

Good night

 

1 Like

Hello Zozo

Have you tried it?

yannick

Hello Yannick

I understood your explanations but I didn't have time to get started.

There! I'm on a very large simulation that is quite complicated and the machine runs a lot for the different scenarios.

I never miss an opportunity to give feedback on advice and especially to offer thanks.

In any case, thank you very much for your help ;-)

(TO BE CONTINUED... )

2 Likes

I was just asking. 

 

Hello @yannick  ;-)

I just got back on the subject but something escapes me in SW's logic

In the MEP and therefore in the background of the plan I have access to certain variables. But for the ones that are missing as "matter" "Mass": if I want to create missing variables I can't, even in Administrator mode. I must be doing it wrong!

On the other hand I read this"

you will have to add a custom property in an example part or through the property form for example or by filling in a property in File => Properties. Then perform:

  • → Create a drawing with the basemap to be modified

Does this mean that I can only create the properties in a model part, so an SDLPART.dot, and also that if my SLDPART.dot doesn't have all the properties I can imagine, I can't create it, nor use it in the basemap. 
I don't understand why the property form doesn't independently create all the properties you want and that  ASM, PRT and DRW use on simple creation in an area of the MEP (here it's the MEP that interests me)

Thanks for the help anyway   ;-]

Kind regards

 

Good evening

 

for example for the material

in the PRT model the name of the variable, we will say ''Matter'' and assign the solidworks variable

 

In the drawing added a note : $PRPSHEET:{Material} 

See attached model.

I don't know how to enter  property forms, I use EPDM. but by hand in the properties it works perfectly

I guess you have to enter all the properties in the model.

 

Kind regards


model.zip

Here is a very good video about the configuration of the property entry form

https://www.youtube.com/watch?v=Kb-9pKZCCTY

 

CDLT

Hello @Yannick

Thank you, I'm looking at all this and I'll keep you informed of the result ;-)

Kind regards

I don't understand where to put the solidworks parameters in the part model, plan and asm >> Happy Wheels 3D

I don't understand where to put the solidworks parameters in the part model, plan and asm >> Happy Wheels 3D

I don't understand where to put the solidworks parameters in the part model, plan and asm >> Happy Wheels 3D

I don't understand where to put the solidworks parameters in the part model, plan and asm >> Happy Wheels 3D

I don't understand where to put the solidworks parameters in the part model, plan and asm >> Happy Wheels 3D

I don't understand where to put the solidworks parameters in the part model, plan and asm >> Happy Wheels 3D