I am learning / experimenting with SketchObjectPython. After testing following steps, I am amazed by what FC / Sketcher do without me writing any codes for it - just wonder what supposed to happen and understand FC / Sketcher's behaviour without having to learn C++ etc. to read FC code
Preparation - No.1 - 2 screencaptures below
- I make 2 SketchObjectPython
- 1st (ArchSketch_Master) with a Rectangle
- 2nd (ArchSketch_Dependent) has No geometry
- 2nd SketchObjectPython has 2 properties
Code: Select all
fp.addProperty("App::PropertyStringList","MasterSketchEdgeGroupsAndEdges","ArchSketch Properties","MasterSketch's Edges ") obj.addProperty("App::PropertyLink","MasterSketch","Referenced Sketches ","Master Sketch")
- In the PropertyStringList, I copy in Tag of 2 edges in 1st object (ArchSketch_Master)
- In the PropertyLink, it is linked to the 1st object (ArchSketch_Dependent)
- Now, I select the 1st object (ArchSketch_Dependent) ... press Ctrl-C to copy
- FC ask if I want to copy the dependency...(the 1st ArchSketch_Master)
- Answer yes, supposedly FC would copy the both SketchObjectPython ...
- Not only a copy of both Objects ... it also make the Copy of 'ArchSketch_Dependent' PropertyLink point to the Copy of 'ArchSketch_Master.'.. that's terrific!
- ... But MORE! In the Copy of 'ArchSketch_Dependent' PropertyStringList - just thought these string of tags are 'meaningless' to FC - FC 'update' these tags by replacing with the corresponding edges' tag in the 'Copy' of ArchSketch_Master. The 'new' tags are different! .
Attached the file with simply the 2 SketchObjectPython for testing.
Thanks in advance.
Maybe @abdullah can give some quick insight?
abdullah wrote: Ping