forked from youen/assembly_handbook
Part name used in sub assembly are now properly display
Step view have CoerceView set to True by default
This commit is contained in:
parent
05e7da16a5
commit
959b2fef0a
@ -63,6 +63,7 @@ class AHB_New_Step:
|
||||
|
||||
view = doc.addObject('TechDraw::DrawViewPart', 'View')
|
||||
view.Perspective = False
|
||||
view.CoarseView = True
|
||||
view.addProperty("App::PropertyString", "Assembly_handbook_PreviousStepView", "Assembly_handbook")
|
||||
if prev_view is None:
|
||||
try:
|
||||
|
@ -366,6 +366,8 @@ class TechDrawExtensions:
|
||||
return None
|
||||
|
||||
def isPartLink(self, obj):
|
||||
if obj is None:
|
||||
return False
|
||||
if obj.TypeId == 'App::Link':
|
||||
return True
|
||||
if obj.TypeId == 'Part::FeaturePython' and hasattr(obj, 'LinkedObject'): # variant link
|
||||
@ -374,7 +376,7 @@ class TechDrawExtensions:
|
||||
|
||||
def getPartDisplayName(self, obj):
|
||||
if self.isPartLink(obj):
|
||||
linked_obj = obj.LinkedObject
|
||||
linked_obj = obj.SourceObject if hasattr(obj, 'SourceObject') else obj.LinkedObject
|
||||
if 'Assembly_handbook_PartDisplayName' in linked_obj.PropertiesList:
|
||||
return linked_obj.Assembly_handbook_PartDisplayName
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user