Skip to main content
1-Visitor
July 20, 2018
Solved

Drawing note based on modified &dwg_name parameter

  • July 20, 2018
  • 16 replies
  • 12871 views

Hello all,

I am trying to have a note on my drawing that is driven by the drawing name but without the last 2 digits.

EG, drawing name is COFFEE_CUP-RED-01 and I would like a note to read COFFEE_CUP-RED

This is so multiple drawings can be linked to the same model but the notes update based on the drawing name.

I managed to write a relation as a proof of concept that would do what I want but I can't use system parameters (&dwg_name instead of rel_model_name) in the relations field I have learnt.

The relation I was using is;

NAMING_NOTE = extract(rel_model_name, 1, (search(rel_model_name, "01")-1))

 

Digging through the forums some have mentioned using the drawing program to act like relations but I  can't figure this out. I am stuck at trying to have a drawing parameter = a system parameter. Even if I got this to work I'm not sure if I can simply add the above relation into the drawing program.

 

Any ideas would be greatly appreciated.

Best answer by mcestnik

Parameter rel_model_name used in drawing proprogram always shows the name of the drawing. It doesn't matter which part is added to the drawing.

 

Test this relation and it should work as you wish:
NAMING_NOTE:D = extract(rel_model_name, 1, (search(rel_model_name, "01")-1))

16 replies

14-Alexandrite
July 20, 2018

Just add this line to drawing program:

NAMING_NOTE: D = extract(rel_model_name, 1, (search(rel_model_name, "01")-1))

 

This will create drawing parameter NAMING_NOTE with drawing name.

Then add a note with &NAMING_NOTE.

 

Example in the attached picture.

1-Visitor
July 22, 2018

Thanks for the reply Mcestnik 

That line works well if I base it off a model parameter (rel_model_name) but what about a system parameter (dwg_name)?

 

This line in the drawing program gives an error;

NAMING_NOTE: D=extract(dwg_name, 1, (search(dwg_name, "01")-1))

14-Alexandrite
July 23, 2018

Parameter rel_model_name used in drawing proprogram refers to the name of the drawing - it is the same as the &dwg_name used in notes/tables.
It gives an error because there is a space between ":" and "D".

 

It should be like this (picture attached):

NAMING_NOTE:D = extract(rel_model_name, 1, (search(rel_model_name, "01")-1))