SolidEdgeHousekeeper icon indicating copy to clipboard operation
SolidEdgeHousekeeper copied to clipboard

Property Find/Replace on FOA

Open rmcanany opened this issue 1 year ago • 4 comments

https://community.sw.siemens.com/s/question/0D5KZ000006oz1C0AQ/solid-edge-housekeeper-v20241-released

Issue with replace string: %{System.File Name (no extension)}. Works on regular assemblies.

Probably need to fix Task_Common.SubstitutePropertyFormula(). SEDoc.FullName returns the name with the member name appended with the delimiter ! That needs to be stripped off before System.IO.Path.GetFileNameWithoutExtension(SEDoc.FullName)

rmcanany avatar May 16 '24 17:05 rmcanany

Robert, remember that each member of FOA has its own properties, there should be an option or a warning about that.

farfilli avatar May 17 '24 07:05 farfilli

Oh, that's news to me. I appreciate the heads-up. How are those accessed? Activating each member in turn, or something like that?

rmcanany avatar May 17 '24 13:05 rmcanany

Yes, activating each member gave you access to member unique properties; I don't know if in the latest releases a better method where implemented.

Programmatically, I think you need to reference the member by the "filename.asm!membername" sintax

farfilli avatar May 17 '24 13:05 farfilli

OK, thanks. I'll check it out.

rmcanany avatar May 17 '24 13:05 rmcanany

With Structured Storage FOA properties are accessible and should be easy to edit them. I will explore this route once it is defined how to specify the FOA Member in the SEHK property editor UI

farfilli avatar Jun 13 '24 12:06 farfilli

I'll give that some thought. Open to your suggestions, too.

rmcanany avatar Jun 13 '24 13:06 rmcanany

@farfilli

I fixed the SEDoc.FullName issue and also added processing for FOA members. I decided that it should only process those files if Apply edits to all members is enabled. There is nothing to stop updates if it isn't; it was more to alert the user that each member will get the same treatment. There's must be a way to treat each member individually, but I thought I'd wait until someone asked before putting in any time on it.

If you don't mind, I'll take you up on the offer to handle the structured storage piece. Not sure the Apply edits is visible from there, but that method is marked as experimental, so whatever you decide should be fine.

One thing I'm not too fond of is the new Project PropertySet. It's one more hurdle for the user and it seems like it wouldn't be that hard to determine where to look for those programmatically. Thoughts?

rmcanany avatar Jul 16 '24 21:07 rmcanany

About the editing of FOA files, a way could be to expand them in the file list and present them as if they were independent files. I do not use FOA due to its limitations and behaviors, it's been years since I've asked for a concrete revisit of them; therefore if there aren't requests I would not implement them in Direct Edit.

About the Project thing, I would have preferred to keep them separated, anyway it's done now with #116

farfilli avatar Jul 17 '24 15:07 farfilli

OK, sounds good. Thank you. Closing as complete.

rmcanany avatar Jul 17 '24 18:07 rmcanany