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

flat model extensions

  • Thread starter Thread starter dicifa
  • Start date Start date

dicifa

Guest
hello to all, I have a question to ask you....
when they are in sheet metal environment I need to export the extensions of the flat model in iproperties before making the tables (where there is already the possibility to insert the development in the cartigllio).....I tried but there is no way to do it....you have any idea?

Thank you. .
 
hello to all, I have a question to ask you....
when they are in sheet metal environment I need to export the extensions of the flat model in iproperties before making the tables (where there is already the possibility to insert the development in the cartigllio).....I tried but there is no way to do it....you have any idea?

Thank you. .
only with a macro vba
 
hello to all, I have a question to ask you....
when they are in sheet metal environment I need to export the extensions of the flat model in iproperties before making the tables (where there is already the possibility to insert the development in the cartigllio).....I tried but there is no way to do it....you have any idea?

Thank you. .
for extensions do you mean the size of the sheet panel from where to develop?
 
when you make the table there is the possibility to obtain these measures as a data field of a text: sheet/extension properties
 
Thanks diegus.... I knew it already but it's not what I'm looking for. I tried to ask my dealer and asked me about 1200€....
 
trovato!

=<flat length="" pattern=""> cm
=<flat pattern="" width=""> cm
=<flat area="" pattern=""> cm^2</flat></flat></flat>
 
Thanks diegus.... I knew it already but it's not what I'm looking for. I tried to ask my dealer and asked me about 1200€....

per 1150€ (un'offertona, come vedi) ti concedo il permesso di copiarti questa macro nel modulo vba (con procedura descritta in precedenza in questo forum trovala!)

contanti? :rolleyes:

private sub flatpatternextents()
' definisce le variabili principali
dim opart as partdocument
dim oflat as flatpattern
dim osheetcompdef as sheetmetalcomponentdefinition


' controlla che il documento attivo sia un documento o un flatpattern
if not ((typeof thisapplication.activeeditobject is flatpattern) or _
(typeof thisapplication.activeeditobject is partdocument)) then
msgbox "una parte o un flatpattern devono essere presenti"
exit sub
end if

if typeof thisapplication.activeeditobject is partdocument then
set opart = thisapplication.activeeditobject
set osheetcompdef = opart.componentdefinition
set oflat = osheetcompdef.flatpattern
else
set oflat = thisapplication.activeeditobject
set opart = oflat.document

end if



' controlla che il flatpattern esista
if oflat is nothing then
msgbox "la parte deve avere il flatpattern"
exit sub
end if

' si crea l'iproperty "sviluppo" e si compila
' nota: si moltiplica *10 per convertire da cm a mm
dim otext as string
otext = round(oflat.width) * 10 & "x" & round(oflat.length * 10)

dim ocustompropset as propertyset
set ocustompropset = opart.propertysets.item("{d5cdd505-2e9c-101b-9397-08002b2cf9ae}")

'elimina la proprietà e la scrive nuova
'se non esiste si ignora l'errore generato
on error resume next
ocustompropset.item("sviluppo").delete

call ocustompropset.add(otext, "sviluppo")

end sub
 
per 1150€ (un'offertona, come vedi) ti concedo il permesso di copiarti questa macro nel modulo vba (con procedura descritta in precedenza in questo forum trovala!)

contanti? :rolleyes:

private sub flatpatternextents()
' definisce le variabili principali
dim opart as partdocument
dim oflat as flatpattern
dim osheetcompdef as sheetmetalcomponentdefinition


' controlla che il documento attivo sia un documento o un flatpattern
if not ((typeof thisapplication.activeeditobject is flatpattern) or _
(typeof thisapplication.activeeditobject is partdocument)) then
msgbox "una parte o un flatpattern devono essere presenti"
exit sub
end if

if typeof thisapplication.activeeditobject is partdocument then
set opart = thisapplication.activeeditobject
set osheetcompdef = opart.componentdefinition
set oflat = osheetcompdef.flatpattern
else
set oflat = thisapplication.activeeditobject
set opart = oflat.document

end if



' controlla che il flatpattern esista
if oflat is nothing then
msgbox "la parte deve avere il flatpattern"
exit sub
end if

' si crea l'iproperty "sviluppo" e si compila
' nota: si moltiplica *10 per convertire da cm a mm
dim otext as string
otext = round(oflat.width) * 10 & "x" & round(oflat.length * 10)

dim ocustompropset as propertyset
set ocustompropset = opart.propertysets.item("{d5cdd505-2e9c-101b-9397-08002b2cf9ae}")

'elimina la proprietà e la scrive nuova
'se non esiste si ignora l'errore generato
on error resume next
ocustompropset.item("sviluppo").delete

call ocustompropset.add(otext, "sviluppo")

end sub
you are a great!!!...I in return can fix you an appointment with ruby steals hearts!!! :36_1_1::36_1_1::36_1_1:

...but here comes a little problem... I don't remember how to make macros....
 
Open the .idw template file
alt+f11 to access the basic visual editor
in the browser, expand document project > modules
double click on module1
copy the macro in the big window.
connect the macro to a button to your own taste by dx button on the top bar -> customize user commands
 

Forum statistics

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

Members online

No members online now.
Back
Top