Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hi,
I am trying to blank a layer in a drawing by TOOLKIT. It's no problem if the layer was created in the drawing, for example a layer named"NOTES" for controlling the notes' display.
In Pro/E's interactive mode it's possible in drw mode to blank/hide the layer "SURFACES" that is defined in parts only. The drw itself does not contain the layer, but you can hide the layer on the drawing to hide all surfaces on the drawing.
My question: Does anyone know how to hide/blank the layersin a drawing that are defined in models and parts only (by using Toolkit functions)?
Thanks,
Andreas
__________________________________
Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Rudolf-Diesel-Str. 6
D-65439 Floersheim / Germany
phone: +49 6145 598296
mail: -
Hi all,
Andreas,
The part/assembly layer belongs to a part or an assembly ProMdl. All you need to do is toget a list of drawing models, for each model do ProMdlLayerVisit or ProModelitemByNameInit in order to get ProLayer(s) listand use ProLayerDisplayStatusSet.
HIH.
FV.
Hi All,
We are facing similar problem with Andreas, but a little more complicate.
We have a drawing with 5 views (same drawing model), and we want each view has different layer display settings.
In Pro/E UI, we should change to each view’s layer object from layer tree, and setup the layer display status individually. (as attachment)
Trying to do it with toolkit, we just can’t find way to get those layer object and the layers.
Does anyone know how to set layer display status of those layer objects?
Thanks a lot
Shu-Fan
Hi All,
Shu-Fan, if Pro/Toolkit has access to drawing view layers thenget model(s) attached to each view,collect model(s) layer names, create layers with the same names in each vew, set your drawing option 'drawing layers override model layers' ( do not remember exact spelling), set view layer status as needed.
Feliks.
In Reply to Shu-Fan Wang:
Hi All,
We are facing similar problem with Andreas, but a little more complicate.
We have a drawing with 5 views (same drawing model), and we want each view has different layer display settings.
In Pro/E UI, we should change to each view’s layer object from layer tree, and setup the layer display status individually. (as attachment)
Trying to do it with toolkit, we just can’t find way to get those layer object and the layers.
Does anyone know how to set layer display status of those layer objects?
Thanks a lot
Shu-Fan
Hi All,
Thanks for you quick reply, Feliks
It works by following your suggestions, the key point is "create layers with the same names in each vew"
The drawing view can recognize thelayers created within drawing, and Pro/E will auto combine the layers with same name (include assembly & parts'), then you can hide/unhide layers as you want.
It really a smart way that we never think about.
Below are our steps for reference
1. ProDrawingFromTmpltCreate -> get drwhdl
2. ProDrawingGeneralviewCreate -> get view
3. Use dtl set :
draw_layer_overrides_model yes
ignore_model_layer_status yes
4. ProMdlLayerGet -> get layer
5. ProLayerCreate -> create same name layer
6. ProDwgLayerDisplaystatusSet -> hide layer
Thanks a lot
Shu-Fan
In Reply to Feliks Veysman:
Hi All,
Shu-Fan, if Pro/Toolkit has access to drawing view layers thenget model(s) attached to each view,collect model(s) layer names, create layers with the same names in each vew, set your drawing option 'drawing layers override model layers' ( do not remember exact spelling), set view layer status as needed.
Feliks.
In Reply to Shu-Fan Wang:Hi All,
We are facing similar problem with Andreas, but a little more complicate.
We have a drawing with 5 views (same drawing model), and we want each view has different layer display settings.
In Pro/E UI, we should change to each view’s layer object from layer tree, and setup the layer display status individually. (as attachment)
Trying to do it with toolkit, we just can’t find way to get those layer object and the layers.
Does anyone know how to set layer display status of those layer objects?
Thanks a lot
Shu-Fan
@Mark:
The use of Pro\develop is stil possible in Creo 2.0. In Creo 3.0 as far as I know it is also possible.
Best regards,
Eike
Hi Bob,
yeah Sry I'm wrong about that. I have looked in the Creo 3.0 and there are no folder anymore and have the PTC Sources installed in my Creo 2.0.
But I have written to Mark (in a mail before, because I don't want to fill up these thread about other things ^^) that there are many new Toolkit functions to serve the missing prodb functions inside the Creo 3.0 Toolkit API. I have tested the run of the compiled prodb/Toolkit mixed applications in Creo 2.0 and 3.0 and everything is working (from the prodb commands I use in my application).
Best regards,
Eike