Hi, |
Re: Copy attributes from a module to another void copyAttributeDefinition(Module m_source, Module m_target, AttrDef ad_source, string s_newName) { AttrType at_target = null AttrType at_source = null string s_typeName = "" if(!null m_source && !null m_target && !null ad_source && s_newName != "") { // find type of source attrdef s_typeName = ad_source.typeName "" at_target = find(m_target, s_typeName) if (null at_target) // if the type of the attrdef does not exist in the target module, create it { at_source = find(m_source, s_typeName) // type of attribute does not exist in target module, copy from source module copyAttrType_(at_source, m_source, m_target) } bool ismulti = ad_source.multi AttrDef__ a = date false history false changeBars false inherit false multi ismulti attribute s_newName a = type s_typeName a if (ad_source.object) a = object a if (ad_source.module) a = module a create a } } |
Re: Copy attributes from a module to another Ken. Attachments attachment_14838884_CopyAttrsPlus.dxl |
Re: Copy attributes from a module to another mcnairk - Fri Jun 15 08:00:04 EDT 2012 Ken. Attachments attachment_14838885_CopyAtts-v13.dxl |
Re: Copy attributes from a module to another mcnairk - Fri Jun 15 08:01:54 EDT 2012 Thanks ! |
Re: Copy attributes from a module to another Estebell - Mon Jun 18 02:55:55 EDT 2012 The last code given by mcnairk works good. But I have some attributes that use enumerated types for example. can I also copy types and update existing types ? BR |
Re: Copy attributes from a module to another Estebell - Mon Jun 18 03:35:07 EDT 2012 ken. |
Re: Copy attributes from a module to another And second question : why I can get list of all "Formal" modules ( from all Projects? |
Re: Copy attributes from a module to another mcnairk - Fri Jun 15 08:01:54 EDT 2012 Hallo When I'm trying this script I'm getting a error to bring the colors from the source module to Target module. Could you please help me. Invalid color specification (42) |
Re: Copy attributes from a module to another mcnairk - Fri Jun 15 08:01:54 EDT 2012 Hallo When I'm trying this script I'm getting a error to bring the colors from the source module to Target module. Could you please help me. -R-E- DXL: <Line:147> Invalid color specification (42) |