• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

macro exhibition/hidden views interrupted

Papao

Guest
Good morning, have any of you already created a macro that shows/hides the edges of broken views in dft environment?
 
I often find myself having to pass between "show interrupted sections" (to update the profile) and hide sections (if I do not hide them, unfortunately in the exported dwg the frame of the interrupted section remains visible).

If no one found it useful, I will try to do it hoping for your help.
Thank you.
 
I think I launch this macro within the dft environment and for this reason I omitted the preliminary controls of "solid edge running" and "open document".

below place the initial code of the macro but right away I get an error in line 7, which I do not understand why.
Why can't I read the open dft document and I get back the error "no document opened in solid edge" and consequently comes out from the macro? ?
Code:
sub main()
    dim objapp as object
    dim objdoc as object
    dim objview as object
      
    
    if objapp.documents.count = 0 then
        msgbox "nessun documento aperto in solid edge.", vbexclamation, "attenzione"
        exit sub
    end if
    
    set objdoc = objapp.activedocument
 
you have not assigned any value to objapp; something like this:

set objapp = getobject(,"solidedge.application")
 
rightly... I added it now, thank you.
Can you help me understand how to do to interrogate the views to "show or hide" the profiles view interrupted section?
I did this but there's something wrong:
Code:
for each objview in objdoc.views
    if objview.type = 16 then
         objview.visible = not objview.visible
    end if
next objview
 
rightly... I added it now, thank you.
Can you help me understand how to do to interrogate the views to "show or hide" the profiles view interrupted section?
I did this but there's something wrong:
Code:
for each objview in objdoc.views
    if objview.type = 16 then
         objview.visible = not objview.visible
    end if
next objview
objview.visible controls the visibility of the entire view
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top